Skip to content
ML Academy

SQL and Python

Interview question

  • seniorlevel
  • 12 minsuggested time
  • 3Data analyst, Data scientist, ML engineer

A daily table stores unique_customers per route per day. Someone builds weekly and monthly dashboards by summing the daily values, and the weekly numbers disagree with the numbers from the raw events. Explain why, show how to compute it correctly, and give a design for a rollup table that can answer "unique customers" at any grain.

Tests: Additive versus non-additive metrics: distinct counts across time and dimensions, designing rollups with keys or sketches, and communicating the accuracy trade-off.

Sign in to practise: answers are saved before model answers are shown.