Data Analyst SQL interview question | Overlapping of dates with other users | Tricky SQL question
Автор: SQL Home
Загружено: 2023-09-08
Просмотров: 481
Описание:
Data Analyst SQL interview question | Overlapping of dates with other users | Tricky SQL question
#dataanalyst #sqlinterviewquestionsandanswers #sqlserver #dataengineering #sql
create and insert statements below:
create table subscriptions (user_id varchar(10),start_date date,end_date date);
insert into subscriptions values('U1','01-JAN-2023','31-JAN-2023');
insert into subscriptions values('U2','16-JAN-2023','26-JAN-2023');
insert into subscriptions values('U3','28-JAN-2023','06-FEB-2023');
insert into subscriptions values('U4','16-FEB-2023','26-FEB-2023');
We need to write a query that returns true/false for each user based on the overlapping of dates with other users. For instance, If user1's subscription period overlaps with any other user the query must return True for user1.
send me your queries at :[email protected]
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: