An analytics engineer mock interview you can run.
The technical round for an analytics engineer role goes past SQL syntax into the daily work: a test that should have caught bad data, a table with duplicate rows, two reports that disagree. These 8 tasks are written that way. Each one runs in your browser on linked tables, and your result is checked.
Free · No signup to run or check
Four habits the tasks look for.
- Tests that return the failing rows
- A data test is a query that returns the rows that break a rule. The first tasks ask you to write one and to decide what counts as a failure.
- One row per key
- Deduplicating to the latest row for each business key, with a tie-break you can state out loud.
- A metric two teams agree on
- The same rate under two date definitions, side by side, so the gap can be explained instead of argued about.
- Totals that reconcile
- Checking a model against its sources: hours that were never written, refunds that arrive late, and a month-by-month difference you can account for.
8 tasks, from a first data test to a model contract check.
Each entry shows the task as you would be given it, the skill it tests, and the mistake that most often fails it. Try the task before you read the mistake.
Write the test that catches an impossible time
A model that turns flight times into timestamps failed overnight, and the error only says that a time could not be parsed. Nothing upstream tested the raw values, so you are asked to write the data test that should have caught it: a query that returns the rows that break a rule, where no rows means the test passes.
- What it tests
- Writing a data test as a query that returns the failing rows, and deciding what counts as a failure
- The mistake that fails it
- Checking only the format (two digits, a colon, two digits), which 24:00 passes
Find the departments a join would hide
The headcount dashboard lists six departments in its filter, but the company has twelve. The dashboard is built on employment records joined to departments, and someone has already confirmed that every record points to a department that exists. That check passed, so the problem is in the other direction.
- What it tests
- Referential integrity checked in both directions, with an anti-join
- The mistake that fails it
- Testing only that every employment record has a department, which passes and never looks the other way
Keep the latest evaluation for each session
The quality dashboard counts 255 evaluated sessions, but only 237 different sessions have ever been evaluated. Some sessions were scored by the automated judge and then scored again by a reviewer or by the user, and the staging model (the first cleaned copy of the source table) passes every row through. The team has agreed that the most recent verdict is the one that counts.
- What it tests
- Deduplicating to one row per business key with ROW_NUMBER and a stated tie-break
- The mistake that fails it
- Ordering the window by evaluated_at ascending, which keeps the first evaluation and discards the later verdict
Two teams, two conversion rates for the same month
Marketing and finance both report a monthly lead-to-purchase conversion rate, and for February 2025 one says 0% and the other says 8.6%. Marketing counts a purchase in the month its lead was created. Finance counts it in the month the purchase happened. Both divide by the leads created in the month, and you have been asked to put the two numbers side by side.
- What it tests
- Computing one metric under two date definitions at the same grain, then joining the results
- The mistake that fails it
- Joining leads to conversions once and grouping by lead month, which only counts a purchase made in the month its lead was created
Find the hours that were never written
A model that reports how rentals rise and fall around the clock assumes the hour table has 24 rows for every date it covers. A row count says otherwise: 2,922 is not a multiple of 24. Before deciding whether rentals were lost, find out exactly which rows are absent.
- What it tests
- Building a spine of the rows that should exist and anti-joining the table to it
- The mistake that fails it
- Looking for gaps with LAG, which returns the hour after the gap, not the missing one
Reconcile paid invoices against cash collected, month by month
The billing dashboard reports paid invoices by the month they were issued. Finance reports cash by the month it was collected. Over three years the two totals are identical, yet the monthly figures rarely match, and finance wants the difference for the second half of 2025 explained before the year closes.
- What it tests
- Reconciling two tables at a shared grain and explaining the difference, not only reporting it
- The mistake that fails it
- Starting from the invoice months, which drops December 2025, a month with collections and no paid invoices
How long a lookback does the incremental model need?
An incremental orders model (one that rebuilds only recent rows on each run, not the whole table) stores each order with its refunded amount. Each night it rebuilds the orders placed within a lookback window of N days before the latest order date, and nothing older. Refunds arrive days or weeks after the order, and finance has noticed that refunded amounts in the model are lower than in the source.
- What it tests
- Reasoning about an incremental load: what a lookback window rebuilds and which late-arriving rows it still misses
- The mistake that fails it
- Subtracting full timestamps instead of calendar dates, which puts a refund issued 30 days and a few hours after its order outside a 30-day window
Check a mart against its contract
A new stock positions mart (a table built for reporting) is about to replace a spreadsheet the warehouse team trusts. The reviewer will approve it only with evidence that it keeps its contract, meaning the promises it makes to the people who use it: one row per product and warehouse, no missing keys, and unit totals that tie back to the source tables.
- What it tests
- Proving a model's grain, keys, and totals against its sources in one pass or fail result
- The mistake that fails it
- Building the mart with an inner join to movements, which drops the seven positions that never moved while uniqueness and not-null still pass
Run it like the real round.
- 01
Set a timer
Give each task fifteen minutes and work without hints the first time through.
- 02
Say what passing looks like
Before you run anything, describe the result you expect. How you decide that a result is right matters as much as the query.
- 03
Name the fix
After each task, say which test or model change would stop the problem from coming back. Then read the worked answer.
The rest of the interview loop.
- Question bank50 analytics engineer interview questions
The questions you answer in words, with answers: data quality, validation, reporting, and how the role is measured.
- SQL screenSQL interview questions you can run
Ten graded questions on joins, window functions, and getting a definition right.
- Modeling roundData modeling interview questions you can run
Eight graded questions on grain, joins that repeat rows, balances, and history.
- dbt rounddbt interview questions and answers
Fundamentals, modeling, tests and deployment, and scenario-based questions, with answers.
- Take-home caseRevenue fell last month
A full take-home assignment on e-commerce tables, with a reference solution to compare against.
- Interview kitThe analytics engineering interview kit
The four rounds of the loop, with worked SQL and modeling answers and a seven-day drill plan.
About this task set
- What is an analytics engineer mock interview?
- A practice run of the technical round. This one is eight tasks taken from the daily work of the role: writing a data test, deduplicating a table, choosing the lookback window of an incremental load, reconciling two tables, and checking a model against its contract. You write SQL for each task in the browser and the result is checked, so you find out whether your answer was right.
- How is this different from a list of questions and answers?
- A list gives you a question and a written answer to read. These tasks give you tables and ask you to produce a result, the way a live exercise or a take-home assignment does. Use the 50-question article linked below for the answers you give in words, and this page to practice the ones you give in SQL.
- Do I need to know dbt?
- No. Every task is plain SQL. Two of them are the SQL underneath a dbt feature: a singular data test is a query that returns the failing rows, and the lookback window of an incremental model decides which late-arriving rows it picks up. If you can write the query, you can explain the dbt version of it.
- Which SQL dialect do the tasks use?
- They run on SQLite in your browser. The joins, CTEs, and window functions are standard SQL and work the same way in BigQuery, Snowflake, and Postgres. Date handling is the part that differs between engines: these answers use substr, date, and julianday where a warehouse would use DATE_TRUNC and DATEDIFF or DATE_DIFF.
- Do I need an account?
- No. Every task runs and is checked without an account. A free account adds hints, keeps track of what you have solved, and shows the worked answer once you have attempted a task.
- Is the data real?
- Six of the eight tasks run on synthetic data, generated to behave like business tables. The other two use real public data: US flight records and hourly bike rentals. Each task runs on a linked sample of one of the free datasets on this site, and the full files can be downloaded for more practice.
