1.Return Orders Customer Feedback |Solving a REAL Business Use Case Using SQL

Опубликовано: 13 Июнь 2026
на канале: namaste dataengineer
149
23

#sql #business #days #analytics
-- Create orders table
CREATE TABLE orders_tbl (
order_id INT PRIMARY KEY,
order_date DATE,
customer_name VARCHAR(50),
sales INT
);

-- Create returns table
CREATE TABLE returns_tbl (
order_id INT,
return_date DATE
);


-- Insert data into orders table
INSERT INTO orders_tbl (order_id, order_date, customer_name, sales) VALUES
(1, '2024-01-01', 'Rajanikanth', 1239),
(2, '2024-01-02', 'Rajanikanth', 1239),
(3, '2024-01-03', 'Rajanikanth', 1239),
(4, '2024-01-03', 'Rajanikanth', 1239),
(5, '2024-01-01', 'Ramesh', 1239),
(6, '2024-01-02', 'Ramesh', 1239),
(7, '2024-01-03', 'Ramesh', 1239);

-- Insert data into returns table
INSERT INTO returns_tbl (order_id, return_date) VALUES
(1, '2024-01-02'),
(2, '2024-01-04'),
(3, '2024-01-05'),
(7, '2024-01-10');
Hi, this is Rajanikanth Gaja and I post videos on Computer Science related concepts, especially data-related technologies, these videos will help you in interviews as well as in clearing your theory and coding questions. If this channel helped you even a bit, please consider subscribing to the channel.

If you need any personal help in SQL, Mock interviews, or Coding help You can contact me at [email protected], Please note it will be charged.
Thank you :)

✨ Work-related E- emails can be sent to: [email protected]