Keep the latest scraped copy

MediumAirbnbdistinct onduplicates· 20 XP

Airbnb's market research team scraped listings on several dates, so the same listing appears up to three times. They want one row per listing, from the most recent scrape.

Treat rows with the same host_name, host_since, city and listing_name as the same listing. Keep only the row with the latest scraped_on for each listing.

Expected output

  • One row per listing; any row order

Example of the shape (made-up values):

listing_name city host_name price scraped_on
Cozy loft in Baixa Lisbon Ana S. 95.00 2026-03-02

Hints, the later steps and the answer come with Pro.

Write your query here. Ctrl + Enter submits.