Interview Core Track · Medium · 25 min
9777 Successfully Sent Messages
WITH success_or_not as ( SELECT ms.message_id, CASE WHEN mr.message_id IS NOT NULL THEN 1 ELSE 0 END as receive_success FROM facebook_messages_sent ms LEFT J...
Company labels are directional practice context, not official interview guidance.
Objective
Practice joins through a Facebook-tagged business scenario.
Approach
Use this track to improve speed, edge-case handling, and accuracy under timed conditions.
Company context
Company labels are directional practice context, not official interview guidance.
WITH success_or_not as ( SELECT ms.message_id, CASE WHEN mr.message_id IS NOT NULL THEN 1 ELSE 0 END as receive_success FROM facebook_messages_sent ms LEFT JOIN facebook_messages_received mr ON ms.message_id=mr.message_id ) SELECT 1.0 * SUM(receive_success) / COUNT(receive_success) as ratio FROM success_or_not
This is a Pro question
Upgrade to Pro to unlock this prompt, the SQL workspace, and all 254 problems.
Upgrade to Pro — unlock all 254 problemsSQL workspace
Run queries against the protected question data, then submit once the result shape looks right.
Sign in to run SQL
Create a free account or sign in before running queries against protected question data.