problems
SQL interview style questions. Write the query, run it on the sample data, then submit. Every submission is graded on named edge cases, random data and a large dataset, so it has to actually be right, and fast enough. Pick PostgreSQL, MySQL or SQL Server, the output has to be the same either way.
app activity
product analyticsabout this dataset
A mobile / web app that logs every user action as an event. This is the classic product analytics setup: daily actives, streaks, retention, sessions, funnels. Big tech data and analyst interviews are full of these.
event_typeis one ofapp_open,view_item,add_to_cart,purchase- a user can have many events per day, and two events can have the exact same timestamp
- "day" always means the calendar date of
event_ts
Answers are checked on the sample data, named test cases, random data and a large dataset, so don't hardcode anything you see in the sample.
SQL developer assessment
bankingabout this dataset
Four questions on a small banking database. Each answer has to be a single SQL statement, CTEs (WITH ...) are fine, no procedural code, loops, cursors or temp tables.
The sample data is for reference only. When you submit, your query also runs against hidden test cases, random datasets and a large dataset with tens of thousands of accounts. So don't hardcode ids, names, dates or row counts you see in the sample. The only fixed values you can use are the ones written in the question (like 2026-06-30).
Column types: ids and codes are text, *_date columns are DATE, *_ts columns are TIMESTAMP, amounts are NUMERIC.
company HR
hrclassicabout this dataset
A company's employees, their managers and departments. The questions here are the classics every SQL interview seems to have a version of: top earner per department, earns more than their manager, second highest salary, median, headcount over time, org chart depth.
manager_idpoints at another employee. The top of the org has no manager (NULL).termination_dateis NULL for people who still work here. Someone is a current employee iftermination_dateis NULL.- a department can have no employees at all
Answers are checked on the sample data, named test cases, random data and a large dataset, so don't hardcode anything you see in the sample.
online store
e-commerceabout this dataset
An online store with customers, products, orders and the items in each order. These are the kind of questions product and data analyst interviews love: top N per group, growth, conversion, repeat rate, anti-joins.
A few things that hold for every question here:
- an order's
statusiscompleted,cancelledorrefunded. Only completed orders count as sales unless the question says otherwise. - revenue for an order line is
quantity * unit_price.unit_priceis what the customer actually paid, it can be lower than the product's listprice. customer_idon an order can be NULL (guest checkout).
Answers are checked on the sample data, named test cases, random data and a large dataset, so don't hardcode anything you see in the sample.