Search ⌘K
F
Facebook

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...

Interview Core Track
Medium
25 min
joins
aggregation

Company labels are directional practice context, not official interview guidance.

Timer 00:00
Back to practice

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.

Prereq: query basics
Prereq: filtering

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

Pro question
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 problems
Editor
SQL 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.