Streaming media · Interview pack

Spotify data interview pack

13 written questions with answers, the loop shape people report for Spotify, and 3 SQL coding labs to practise. Built from DataLane's original question bank and publicly discussed interview themes, not leaked exams. Last editorial update 2026-09-12.

What is in this pack

Questions by topic

  • SQL2
  • Orchestration3
  • Streaming1
  • Warehouse4
  • System design3
  • SQL coding labs3

2 easy · 8 medium · 3 hard

Rounds (2)

  1. SQL
  2. Warehouse

Themes: Play events, Uniques, Warehouse cost

Free with a DataLane account

The first 3 questions are below. Sign in (free, no plan needed) to read all 13 and download the pack as a PDF.

Sign in free to download

Free preview

  1. 1. SQL · easy · SQL

    Sessionize click events with a 30-minute inactivity gap.

    Flag a new session when occurred_at − lag(occurred_at) over the customer is greater than 30 minutes (or null for the first event). Then session_id = a running sum of that flag. That is islands-and-gaps. Do not group by a floored timestamp — that splits real sessions and merges strangers.

  2. 2. SQL · medium · SQL

    You grouped by DATE_TRUNC(week, ts) and compared to last week. Why are week 1 and week 53 lying?

    ISO vs locale weeks, incomplete first/last weeks, and time zones. Compare on a date spine with is_partial_week, or use a 7-day trailing window from today instead of calendar weeks.

  3. 3. Orchestration · hard · Airflow

    A load task appends. The retry doubled yesterday. What was missing?

    Idempotency: delete-then-insert for the partition, or MERGE on a business key. Passing a 50 MB dataframe through XCom is the other fail — XCom is for small metadata (paths, watermarks), not data.

10 more questions and 3 SQL labs are in the full pack.

Sign in free to unlock →

Search DataLane

↑↓ navigatealt ↑↓ jump group↵ openesc close