SQL · Pinterest · Medium
Table: sessions Column Name Type session_id int start_time timestamp end_time timestamp session_id is the primary key. Write a query to identify every session that overlaps with at least one other session. For each such session, output its session_id and the number of distinct other sessions that overlap with it. Two sessions are considered overlapping when: Sort the result by concurrent_sessions in descending order. The expected output format is illustrated in the example…
Checking your access…