filmov
tv
LeetCode Hard 2362 “Generate the Invoice' Interview SQL Question Explanation | EDS
![preview_player](https://i.ytimg.com/vi/S95lmomqllE/maxresdefault.jpg)
Показать описание
SQL Schema:
Create table If Not Exists Products (product_id int, price int)
Create table If Not Exists Purchases (invoice_id int, product_id int, quantity int)
Truncate table Products
insert into Products (product_id, price) values ('1', '100')
insert into Products (product_id, price) values ('2', '200')
Truncate table Purchases
insert into Purchases (invoice_id, product_id, quantity) values ('1', '1', '2')
insert into Purchases (invoice_id, product_id, quantity) values ('3', '2', '1')
insert into Purchases (invoice_id, product_id, quantity) values ('2', '2', '3')
insert into Purchases (invoice_id, product_id, quantity) values ('2', '1', '4')
insert into Purchases (invoice_id, product_id, quantity) values ('4', '1', '10')
In this video I solve and explain a medium difficulty leetcode SQL question using MySQL query. This question has been asked in Apple, Facebook, Amazon, Google, Adobe, Microsoft, Adobe interviews or what we popularly call FAANG interviews.
I explain the related concept as well. This question includes points to keep in mind to develop SQL queries.
LeetCode is the best platform to help you enhance your skills, expand your knowledge and prepare for technical interviews.
If you found this helpful, Like and Subscribe to the channel for more content.
#LeetCodeSQL #FAANG #SQLinterviewQuestions
Комментарии