NTT DATA SQL INTERVIEW QUESTION | Solve 80/20 Pareto rule

 DROP TABLE IF EXISTS Products


-- Create the table

CREATE TABLE Products (

    ProductID INT PRIMARY KEY,

    Name VARCHAR(50),

    Sales DECIMAL(10, 2)

);


-- Insert data into the table

INSERT INTO Products (ProductID, Name, Sales) VALUES

(1, 'Laptop', 8000.00),

(2, 'Smartphone', 7000.00),

(3, 'Tablet', 1500.00),

(4, 'Headphones', 800.00),

(5, 'Smartwatch', 700.00),

(6, 'Monitor', 500.00),

(7, 'Keyboard', 300.00),

(8, 'Mouse', 200.00),

(9, 'Charger', 100.00),

(10, 'USB Cable', 100.00);


 SELECT * FROM Products

Comments

Popular posts from this blog

50 Essential SQL Questions to Land Your Dream Job

How to find all the customers who placed orders on three consecutive days | SQL Scenario questions

ACCENTURE SQL INTERVIEW QUESTION | Change the ProductIDs