AnalystPath

Frequent Host-Guest Pairs

SQLEasyJunior level~15 min

Problem

Table: `recording_session`

| Column Name | Type |
|---|---|
| host_id | int |
| guest_id | int |
| session_no | int |

`session_no` is the primary key. Each row records that a podcast host and a guest recorded an episode together.

Find every `(host_id, guest_id)` pair that has recorded together **at least three times**. Return the result in any order.

Tables

Example rows — the live problem includes the full dataset.

recording_session
host_idguest_idsession_no
110
111
112

Expected output

Your answer should return 1 row with the columns host_id, guest_id.

Starter code (SQL)

SELECT *
FROM recording_session;

Solve this SQL question free

Write SQL and run it instantly in your browser — even on your phone. No signup needed to try.

Solution & explanation

Create a free account to unlock the optimal solution, a step-by-step explanation, and the hidden test cases that grade your answer.

Sign up free to unlock

Related SQL questions