Data Analyst recruitment can include a practical test involving a small dataset, SQL queries or a request to explain a business finding. This practice test covers the kind of reasoning employers may assess. The dataset is fictional and deliberately small so you can complete the exercises using a spreadsheet or a SQL database.
Preparing for a Data Analyst interview? Explore the Data Analyst Interview Questions and Answers guide from Interview Detectives for further role-specific practice.
Practice dataset
The orders table contains one row per recorded order. Amount is the total order value in pounds. A missing amount is shown as NULL. Cancelled orders should be excluded when calculating completed sales. The duplicate order ID represents an intentional data quality problem.
| order_id | region | status | amount |
|---|---|---|---|
| 101 | North | Completed | 120 |
| 102 | South | Completed | 80 |
| 103 | North | Cancelled | 50 |
| 104 | South | Completed | 200 |
| 105 | North | Completed | NULL |
| 106 | South | Completed | 100 |
| 106 | South | Completed | 100 |
Exercise 1: Identify data quality issues
Task: Review the dataset and explain how you would prepare it for analysis.
Worked answer
Order 106 appears twice with identical values. I would confirm that order_id should be unique and check the source before removing one duplicate record. Order 105 has a missing amount. I would investigate the missing value and retain the record for order counts if its completed status is valid. For revenue calculations I would report the missing amount separately, because treating it as zero would imply a value we have not established.
I would also confirm how the business defines a completed sale. For this exercise, cancelled orders are excluded from the revenue calculation.
Exercise 2: Write a SQL query for completed sales by region
Task: Calculate the known completed sales value by region after removing the exact duplicate row.
Worked SQL answer
WITH clean_orders AS (
SELECT DISTINCT order_id, region, status, amount
FROM orders
)
SELECT region, SUM(amount) AS known_sales
FROM clean_orders
WHERE status = 'Completed'
GROUP BY region
ORDER BY region;
| Region | Known completed sales |
|---|---|
| North | £120 |
| South | £380 |
SUM ignores NULL values in standard SQL. The results therefore represent known sales rather than complete revenue. SELECT DISTINCT is appropriate for the identical duplicate in this exercise. If duplicate IDs had conflicting values, I would investigate and establish which record was authoritative before choosing a deduplication rule.
Exercise 3: Calculate average order value
Task: Calculate average completed order value using orders with a recorded amount.
Worked answer
After removing the duplicate, the known completed amounts are 120, 80, 200 and 100. Their sum is 500. Dividing by the four completed orders with known amounts gives an average of £125. There are five unique completed orders overall, so the missing value should be reported alongside this result.
WITH clean_orders AS (
SELECT DISTINCT order_id, region, status, amount
FROM orders
)
SELECT AVG(amount) AS average_known_order_value,
COUNT(amount) AS orders_with_known_amount,
COUNT(*) AS completed_orders
FROM clean_orders
WHERE status = 'Completed';
Using COUNT(amount) excludes missing values. COUNT(*) includes every completed row after deduplication. The difference between the two counts identifies how many completed orders have an unknown amount.
Exercise 4: Explain the finding to a manager
Task: The sales manager asks which region is performing better. Write a short response.
Worked answer
South has the higher recorded completed sales value, at £380 compared with £120 for North. One North order has a missing amount, so its actual revenue may be higher than the known figure. I would recover that value before drawing a firm comparison. I would also check the period covered by the dataset and whether the regions have different customer populations or targets before assessing overall performance.
The answer reports what is supported by the data and identifies the limits of the comparison. A useful analyst makes the uncertainty clear to the person making the decision.
Exercise 5: Design a simple dashboard
Task: Recommend a dashboard for the sales manager based on this dataset.
Worked answer
I would start with a card for known completed sales (£500) and another for completed orders (5). A bar chart could compare known sales by region. I would include a data quality note showing that one completed order has an unknown value. With a larger dataset containing order dates, I would add a time series to show changes over time.
I would agree the metric definitions with the sales manager before building the dashboard. In particular, users should understand whether cancelled orders are excluded and how missing amounts affect revenue totals.
How to prepare for a Data Analyst technical interview
Practise explaining your assumptions before calculating a result. When you write SQL, check the level of detail represented by each row and consider how duplicates and missing values affect the output. Verify a small set of results manually where possible.
For broader technical and experience questions, read our Data Analyst interview questions and sample answers.
Preparing for a Data Analyst interview? Explore the Data Analyst Interview Questions and Answers guide from Interview Detectives for further role-specific practice.
