Detect Overlapping Meetings
Problem
**[Asked at Microsoft]**
A user has conflicting meetings when two meetings of theirs overlap in time.
Two intervals overlap when `a.start < b.end AND b.start < a.end`.
Return each conflict as `user_id`, `meeting_id`, `conflicting_meeting`
(with `meeting_id < conflicting_meeting` to avoid duplicates),
ordered by user then meeting.
Tables
Example rows — the live problem includes the full dataset.
meetings
| meeting_id | user_id | start_time | end_time |
|---|
Expected output
Your answer should return 1 row with the columns user_id, meeting_id, conflicting_meeting.
Starter code (SQL)
SELECT *
FROM meetings;Solve this SQL question free
Write SQL and run it instantly in your browser — even on your phone. No signup needed to try.
Solution & explanation
Create a free account to unlock the optimal solution, a step-by-step explanation, and the hidden test cases that grade your answer.
Sign up free to unlock