Google: Meet Calls Where Guests Waited for a Late Host

Medium
690.

Google: Meet Calls Where Guests Waited for a Late Host

The Google Meet team is testing a nudge for hosts who keep people waiting. A participant's arrival is their first join to a call (people often drop and rejoin).

A call qualifies when its host arrived more than 5 minutes (300 seconds) after scheduled_start and at least one guest (anyone other than the host) arrived strictly before the host. Calls the host never joined are left out. Return meeting_id, host_email, host_late_minutes (whole minutes from scheduled_start to the host's arrival) and guests_waiting (guests who arrived before the host). Order by host_late_minutes descending, then meeting_id ascending.

A practice scenario set at Google: the tables and data are invented, and this is not a question from, or endorsed by, Google.

Tables

Table: MeetCall

ColumnType
meeting_idint
host_emailvarchar
scheduled_startdatetime

Primary key: meeting_id.

One scheduled Meet call and its host.

Table: MeetJoin

ColumnType
join_idint
meeting_idint
participant_emailvarchar
joined_atdatetime

Primary key: join_id.

One time a participant entered a call; the same person can have several rows for one call.

Example

The rows must come back in the order shown.

MeetCall

meeting_idhost_emailscheduled_start
1asha@zentrix.io2025-06-02 10:00:00
2ravi@zentrix.io2025-06-02 11:00:00
3meera@zentrix.io2025-06-02 12:00:00
4kabir@zentrix.io2025-06-02 15:00:00
5zara@zentrix.io2025-06-02 16:00:00

MeetJoin

join_idmeeting_idparticipant_emailjoined_at
11neha@zentrix.io2025-06-02 09:59:00
21dev@zentrix.io2025-06-02 10:03:00
31asha@zentrix.io2025-06-02 10:12:30
41dev@zentrix.io2025-06-02 10:20:00
52neha@zentrix.io2025-06-02 11:01:00
62ravi@zentrix.io2025-06-02 11:05:00
73meera@zentrix.io2025-06-02 12:09:00
83dev@zentrix.io2025-06-02 12:10:00
94neha@zentrix.io2025-06-02 15:00:00
105dev@zentrix.io2025-06-02 16:06:00
2 more rows

Output

meeting_idhost_emailhost_late_minutesguests_waiting
1asha@zentrix.io122
5zara@zentrix.io81
Read the hints, the editorial and the reference solution
-- Write your MySQL query below

Sign in to write, run and submit queries

A free account — no card, no trial clock. You come straight back here.

Run your query to see its result next to the expected one, example by example.

Google: Meet Calls Where Guests Waited for a Late Host

The Google Meet team is testing a nudge for hosts who keep people waiting.

  • Difficulty: Medium
  • Topics: Joins, Aggregation, Dates
  • Dialect: MySQL
  • Problem: #690

Problem statement

The Google Meet team is testing a nudge for hosts who keep people waiting. A participant's arrival is their first join to a call (people often drop and rejoin).

A call qualifies when its host arrived more than 5 minutes (300 seconds) after scheduled_start and at least one guest (anyone other than the host) arrived strictly before the host. Calls the host never joined are left out. Return meeting_id, host_email, host_late_minutes (whole minutes from scheduled_start to the host's arrival) and guests_waiting (guests who arrived before the host). Order by host_late_minutes descending, then meeting_id ascending.

A practice scenario set at Google: the tables and data are invented, and this is not a question from, or endorsed by, Google.

Tables

Table: MeetCall

ColumnType
meeting_idint
host_emailvarchar
scheduled_startdatetime

Primary key: meeting_id.

One scheduled Meet call and its host.

Table: MeetJoin

ColumnType
join_idint
meeting_idint
participant_emailvarchar
joined_atdatetime

Primary key: join_id.

One time a participant entered a call; the same person can have several rows for one call.

Examples

Example 1

MeetCall

meeting_idhost_emailscheduled_start
1asha@zentrix.io2025-06-02 10:00:00
2ravi@zentrix.io2025-06-02 11:00:00
3meera@zentrix.io2025-06-02 12:00:00
4kabir@zentrix.io2025-06-02 15:00:00
5zara@zentrix.io2025-06-02 16:00:00

MeetJoin

join_idmeeting_idparticipant_emailjoined_at
11neha@zentrix.io2025-06-02 09:59:00
21dev@zentrix.io2025-06-02 10:03:00
31asha@zentrix.io2025-06-02 10:12:30
41dev@zentrix.io2025-06-02 10:20:00
52neha@zentrix.io2025-06-02 11:01:00
62ravi@zentrix.io2025-06-02 11:05:00
73meera@zentrix.io2025-06-02 12:09:00
83dev@zentrix.io2025-06-02 12:10:00
94neha@zentrix.io2025-06-02 15:00:00
105dev@zentrix.io2025-06-02 16:06:00
115zara@zentrix.io2025-06-02 16:08:00
125zara@zentrix.io2025-06-02 16:30:00

Output

meeting_idhost_emailhost_late_minutesguests_waiting
1asha@zentrix.io122
5zara@zentrix.io81

How to solve Google: Meet Calls Where Guests Waited for a Late Host

Rejoins are the trap: a guest who arrived early, dropped and came back late is still someone who waited, and a host who rejoined later did not arrive late a second time. So the log is first reduced to arrivals — MIN(joined_at) per call and participant.

The host's arrival is the arrival row whose participant is the call's host_email; an inner join drops calls the host never entered. Lateness is measured exactly in seconds so that a host at 5:00 is on time and one at 5:01 is late, then reported in whole minutes with TIMESTAMPDIFF(MINUTE, …).

Joining the late hosts back to the arrivals of everyone else with arrived_at < host_at leaves the guests who were already waiting; a guest who arrived at the same second as the host did not wait. Calls with no such guest produce no row, which is the "at least one guest" rule. Because arrivals are unique per person, COUNT(*) counts people.

The alternative finds the host's arrival with conditional aggregation — MIN(CASE WHEN participant = host …) — and counts waiting guests straight from the raw log with COUNT(DISTINCT …), since a person with any join before the host's arrival has an arrival before it too.

Reference solution (MySQL)

WITH arrivals AS (
  SELECT meeting_id, participant_email, MIN(joined_at) AS arrived_at
  FROM MeetJoin
  GROUP BY meeting_id, participant_email
), hosts AS (
  SELECT c.meeting_id, c.host_email, c.scheduled_start, a.arrived_at AS host_at
  FROM MeetCall c
  JOIN arrivals a ON a.meeting_id = c.meeting_id AND a.participant_email = c.host_email
  WHERE TIMESTAMPDIFF(SECOND, c.scheduled_start, a.arrived_at) > 300
)
SELECT h.meeting_id, h.host_email,
       TIMESTAMPDIFF(MINUTE, h.scheduled_start, h.host_at) AS host_late_minutes,
       COUNT(*) AS guests_waiting
FROM hosts h
JOIN arrivals g
  ON g.meeting_id = h.meeting_id
 AND g.participant_email <> h.host_email
 AND g.arrived_at < h.host_at
GROUP BY h.meeting_id, h.host_email, h.scheduled_start, h.host_at
ORDER BY host_late_minutes DESC, h.meeting_id

Another way

SELECT x.meeting_id, x.host_email, TIMESTAMPDIFF(MINUTE, x.scheduled_start, x.host_at) AS host_late_minutes, COUNT(DISTINCT j.participant_email) AS guests_waiting FROM (SELECT c.meeting_id, c.host_email, c.scheduled_start, MIN(CASE WHEN j.participant_email = c.host_email THEN j.joined_at END) AS host_at FROM MeetCall c JOIN MeetJoin j ON j.meeting_id = c.meeting_id GROUP BY c.meeting_id, c.host_email, c.scheduled_start) x JOIN MeetJoin j ON j.meeting_id = x.meeting_id AND j.participant_email <> x.host_email AND j.joined_at < x.host_at WHERE x.host_at > DATE_ADD(x.scheduled_start, INTERVAL 300 SECOND) GROUP BY x.meeting_id, x.host_email, x.scheduled_start, x.host_at ORDER BY host_late_minutes DESC, x.meeting_id

← Google: Cloud Cost Spikes Against the Trailing Week · Google: YouTube Channels Eligible for the Partner Programme →