Search ⌘K
Airbnb
Airbnb

Foundations Track · Easy · 15 min

3. What does the keyword DISTINCT do

The DISTINCT keyword removes duplicates from a SELECT query. Suppose you had a table of Airbnb customers, and wanted to figure out which cities the customers...

Foundations Track
Easy
15 min
filtering

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

Timer 00:00
Back to practice

Objective

Practice filtering through a Airbnb-tagged business scenario.

Approach

Use this track to lock in clean query structure, basic filtering logic, and confidence with grouped output.

Company context

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

Prereq: query basics

The DISTINCT keyword removes duplicates from a SELECT query. Suppose you had a table of Airbnb customers, and wanted to figure out which cities the customers lived in, but didn't want duplicate results. airbnb_customers table: name city ------------------- Akash SF Brittany NYC Carlos NYC Diego Seattle Eva SF Faye Seattle You could write a query like this to filter out the repeated cities: SELECT DISTINCT city FROM airbnb_customers; Your result would be: city --------- SF NYC Seattle ---

airbnb_customers
name VARCHAR(100
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.