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

preview_player
Показать описание
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
Рекомендации по теме
visit shbcf.ru