LeetCode 1565 Interview SQL Question with Detailed Explanation | Practice SQL

  Рет қаралды 3,795

Everyday Data Science

Everyday Data Science

Күн бұрын

Пікірлер: 8
@mlvprasadofficial
@mlvprasadofficial 2 жыл бұрын
select left(order_date, 7) as month, count( order_id ) as order_count, count(distinct customer_id) as customer_count from Orders where invoice>20 group by left(order_date, 7)
@dornalanavya1722
@dornalanavya1722 6 ай бұрын
great explanation sir thank you so much
@the_fury07
@the_fury07 8 ай бұрын
we also can use date_format(order_date, yyyy-mm) to group by
@aakashbhandari9761
@aakashbhandari9761 Жыл бұрын
Thanks a lot for this playlist❤
@sukumar-m4t
@sukumar-m4t 7 күн бұрын
LeetCode prime Q/A
@mlvprasadofficial
@mlvprasadofficial 2 жыл бұрын
30
@prathamsarraf6999
@prathamsarraf6999 5 ай бұрын
CREATE TABLE Orders ( order_id INT, order_date DATE, customer_id INT, invoice INT ); INSERT INTO Orders (order_id, order_date, customer_id, invoice) VALUES (1, '2020-09-15', 1, 30), (2, '2020-09-17', 2, 90), (3, '2020-10-06', 3, 20), (4, '2020-10-20', 3, 21), (5, '2020-11-10', 1, 10), (6, '2020-11-21', 2, 15), (7, '2020-12-01', 4, 55), (8, '2020-12-03', 4, 77), (9, '2021-01-07', 3, 31), (10, '2021-01-15', 2, 20); SELECT SUBSTRING(order_date,1,7) AS month ,COUNT(*) AS order_count,COUNT(DISTINCT customer_id) AS customer_count FROM Orders WHERE invoice>20 GROUP BY SUBSTRING(order_date,1,7)
@sammyd4042
@sammyd4042 14 күн бұрын
Thanks bro
MLV Prasad - LeetCode SQL [ MEDIUM] | 0550 | "Game Play Analysis IV" |
8:07
Data Science University - MLV Prasad
Рет қаралды 960
MLV Prasad - LeetCode SQL [ MEDIUM] | 0180 | "Consecutive Numbers" |
8:03
Data Science University - MLV Prasad
Рет қаралды 740
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
MLV Prasad - LeetCode SQL [ MEDIUM ] |  | "1321 " | Restaurant Growth
16:24
Data Science University - MLV Prasad
Рет қаралды 680
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН