SQL Interview Question || Solve the Query Using Single SELECT Statement || Try This!

Опубликовано: 14 Октябрь 2024
на канале: Data Project Hub
85
like

In this video we will solve a sql interview question.

Table Script:

create table customer_order(order_id int,
customer_id int,
order_amount float,
order_date date)

insert into customer_order(order_id,customer_id, order_amount, order_date)
values(1, 101, 120.50 ,'2099-01-01'),
(2, 102, 55.00 ,'2099-01-03'),
(3, 101, 200.00 ,'2099-01-05'),
(4, 103, 150.00 ,'2099-01-08'),
(5, 101, 75.75 ,'2099-01-10'),
(6, 102, 300.50 ,'2099-01-12'),
(7, 101, 110.25 ,'2099-01-15'),
(8, 104, 500.00 ,'2099-01-18'),
(9, 101, 85.00 ,'2099-01-20'),
(10, 102, 120.00 ,'2099-01-22'),
(11, 101, 90.00 ,'2099-01-25'),
(12, 103, 60.00 ,'2099-01-28'),
(13, 101, 95.00 ,'2099-01-30'),
(14, 105, 450.75 ,'2099-02-01'),
(15, 102, 75.00 ,'2099-02-03'),
(16, 102, 85.50 ,'2099-02-06'),
(17, 103, 200.00 ,'2099-02-08'),
(18, 102, 250.00 ,'2099-02-10'),
(19, 105, 300.25 ,'2099-02-12'),
(20, 104, 600.00 ,'2099-02-14'),
(21, 102, 125.50 ,'2099-02-16'),
(22, 103, 90.00 ,'2099-02-18'),
(23, 101, 110.00 ,'2099-02-20'),
(24, 105, 75.50 ,'2099-02-22'),
(25, 102, 200.00 ,'2099-02-24'),
(26, 103, 95.75 ,'2099-02-26'),
(27, 102, 60.00 ,'2099-02-28'),
(28, 105, 175.00 ,'2099-03-01'),
(29, 101, 100.00 ,'2099-03-03'),
(30, 104, 120.00 ,'2099-03-05')

🔍 Looking for something specific? Check out my curated playlists.

✅Complex SQL Interview Questions
   • Complex SQL Interview Questions: Mast...  

✅SQL Interview Questions
   • SQL Interview Bootcamp: Questions & P...  

✅SQL Mastery Interview Prep
   • SQL Concepts: Detailed Interview Ques...  

✅Learn SQL Concepts
   • SQL Fundamentals: Key Concepts and Sk...  

✅SQL Functions
   • SQL Functions Explained: Practical Us...  

📩 Contact: For any inquiries or collaborations, please email me at [email protected]

Don't forget to hit the subscribe button and ring the notification bell to never miss an update! Become a valued member of our passionate community and be part of the journey with me!

Thanks for watching, and see you in the next video!" 🚀