How many users started a call with more than 3 different people in the last 7 days?
Table name: video_calls
This table has 1 row per unique call. Assume it only includes calls between 2 individuals.
Table name: dim_all_users
Question 1: How many users started a call with more than 3 different people in the last 7 days?
Table: video_calls
callerBIGINT — FB ID of person who made the callrecipientBIGINT — FB ID of person who was calleddsSTRING — date of the callcall_idBIGINT — each call has a unique IDdurationDOUBLE — length of time of call, in seconds
Table: dim_all_users
user_idBIGINT — user’s FB IDage_bucketSTRING — user’s age categorycountrySTRING — country where the user is basedprimary_osSTRING — main device operating systemdau_flagTINYINT — 1 for daily active users, else 0dsSTRING — date of the record
This problem is a user-level aggregation task over call logs. The key is to treat the caller as the user who started the call, then count how many distinct recipients each caller contacted within the last 7 days. After filtering to the required date window, group by caller, compute the distinct number of people they called, and count how many callers exceed the threshold of 3. The main pitfalls are confusing caller with recipient and forgetting to use distinct counts.