Compute Unique Google Meet Minutes per User From Overlapping Joins

Last updated: November 29, 2026

Quick Overview

Users can be in several Google Meet calls at once or rejoin the same call, so participation intervals overlap. For each user, merge overlapping intervals and return total unique minutes in meetings for the week.

Google
Data Manipulation (SQL/Python)
Data Engineer
Google
November 29, 2026
Data Engineer
Onsite
Data Manipulation (SQL/Python)
Hard

0

0

0 solved


Users can be in several Google Meet calls at once or rejoin the same call, so participation intervals overlap. For each user, merge overlapping intervals and return total unique minutes in meetings for the week.

A gaps-and-islands SQL problem framed around Workspace usage reporting, where admins see time in meetings per employee. The Google onsite interviewer checks that you merge intervals with a running maximum end time, not just with the previous row, which fails when a long interval contains short ones.

What the Interviewer Expects
  • Explain why summing raw durations double counts overlaps
  • Order intervals by start and track the running maximum end before each row
  • Start a new island when a join begins after that running max
  • Number islands with a cumulative sum and aggregate each island
  • Decide how touching intervals (end equals next start) are treated
Key Topics to Cover
gaps and islands
interval merging
running max
window functions
How to Approach This
  1. Clarify the schema and expected output format before writing queries.
  2. Use CTEs (WITH clauses) to break complex queries into readable steps.
  3. Consider window functions (ROW_NUMBER, RANK, LAG, LEAD) for ranking and sequential analysis.
  4. Watch for NULLs, duplicates, and edge cases in JOINs and GROUP BY.
  5. For pandas, prefer vectorized operations over row-by-row iteration.
Possible Follow-up Questions
  • How would you split time across calendar days for a daily report?
  • How would you compute the peak number of simultaneous calls per user?
  • Leave events are sometimes missing. How would you impute them?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice SQL Problems
Sample Answer
Clarify the Data

meet_participation(user_id, meeting_id, join_ts, leave_ts), one row per join (rejoins after a drop are new rows). Rows with leave_ts <= join_ts are logging errors and are excluded. The week is Mon...

Approach

Order a user's intervals by join time. If a join starts after the latest leave seen in all earlier rows, it starts a new busy block; otherwise it overlaps the current block. The running max matters: w...


Submit Your Answer
Markdown supported