Search ⌘K
Airbnb
Airbnb

Interview Core Track · Easy · 15 min

10078 Find Matching Hosts And Guests In A Way That They Are Both Of The Same Gender And Nationality

SELECT distinct h.host_id, g.guest_id FROM airbnb_hosts h JOIN airbnb_guests g ON h.nationality=g.nationality and h.gender = g.gender

Interview Core Track
Easy
15 min
joins
filtering

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

Timer 00:00
Back to practice

Objective

Practice joins through a Airbnb-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

SELECT distinct h.host_id, g.guest_id FROM airbnb_hosts h JOIN airbnb_guests g ON h.nationality=g.nationality and h.gender = g.gender

airbnb_hosts
host_id INT PRIMARY KEY
nationality VARCHAR(50
airbnb_guests
guest_id INT PRIMARY KEY
nationality VARCHAR(50
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.