MP3JOSS

Advanced SQL Query - 2 | Interview Question | Nested GROUP BY

Advanced SQL Query - 2 | Interview Question | Nested GROUP BY

Choose Download Format

Download MP3 Download MP4

Details

TitleAdvanced SQL Query - 2 | Interview Question | Nested GROUP BY
AuthorShreyas
Duration6:41
File FormatMP3 / MP4
Original URL https://youtube.com/watch?v=VvYTOyhoY9Q

Description

Script for creating Table:
drop table new_cust;
create table new_cust (
joining_date date,
customer_id int
);
insert into new_cust
values(cast('2019-10-02' as date),3),(cast('2019-07-01' as date),7),(cast('2020-01-01' as date),3),(cast('2020-02-23' as date),19)
,(cast('2022-10-10' as date),3),(cast('2022-12-15' as date),3),(cast('2023-02-28' as date),12) ,(cast('2023-08-08' as date),19);

select * from new_cust

🎧 Just For You

🎵 Perfect - Ed Sheeran 🎵 Afterlife - Alex G 🎵 Despacito - Luis Fonsi & Daddy Yankee… 🎵 Golden - Huntr/X 🎵 Tonight - Pinkpantheress 🎵 Childlike Things - Fka Twigs 🎵 Daisies - Justin Bieber 🎵 Abracadabra - Lady Gaga 🎵 What I Want - Morgan Wallen Feat. Tate… 🎵 Havana - Camila Cabello Feat. Young Thug 🎵 Starships - Nicki Minaj 🎵 Catch These Fists - Wet Leg