Meeting Duration

ASKED IN INTERVIEW
4pts
Zoom

Problem Statement

Zoom provides different features based on whether a user has a Free or Pro account. One key metric for the product team is understanding how meeting lengths differ between these two tiers.

Write an SQL query to find the average meeting duration in minutes for each account type.

Rules:

  • A meeting duration is defined as the difference between the end_time and the start_time.
  • The average duration should be rounded to 2 decimal places.
  • Only include completed meetings (where end_time is not null).
  • Output columns: account_type, average_duration_minutes.
  • Sort the results by average_duration_minutes in descending order.

Table Schema:

  • Users: user_id, user_name, account_type (Free, Pro), signup_date.
  • Meetings: meeting_id, host_id, start_time, end_time.
Tests your understanding of
Aggregation, DateTime, Joins and Arithmetic

Input Tables

Users
user_id(INTEGER)account_type(VARCHAR)
1Free
2Pro
3Pro
4Free
5Pro
Meetings
meeting_id(INTEGER)host_id(INTEGER)start_time(TIMESTAMP)end_time(TIMESTAMP)
10112026-02-01 10:00:002026-02-01 10:30:00
10222026-02-01 11:00:002026-02-01 12:30:00
10332026-02-01 14:00:002026-02-01 14:45:00
10412026-02-02 09:00:002026-02-02 09:40:00
10552026-02-02 10:00:002026-02-02 11:15:00
10642026-02-02 13:00:002026-02-02 13:20:00

Expected Output

account_type(VARCHAR)average_duration_minutes(DECIMAL)
Pro70
Free30

Tags

MediumASKED IN INTERVIEWAggregationDateTimeJoinsArithmetic
15 min
61%

Hints