Coding challenges
SQL and Python
Original SQL, pandas and Python questions like the ones data analyst and data engineer interviews use. Write your answer, run it on real data in your browser and check it against hidden tests. Then practise explaining it out loud, the part most people never rehearse.
Free, with no account needed. Your code runs on your own device and isn’t sent to us.
A new one every day
Today’s challenge
Three kinds of challenge
Practise what data interviews
SQL is in almost every data analyst and data engineer interview. Analyst roles often add pandas; engineering roles add plain Python for handling records.
- 41 challenges
SQL
Joins, grouping, window functions and dates: the SQL that data interviews test most.
- 17 challenges
pandas
Cleaning, merging and summarising data with pandas, as analyst interviews ask.
- 17 challenges
Python
Plain Python for data pipelines: parsing, deduplicating, merging and batching records.
Every challenge
All 75
Each one gives you a task, the data and a place to write your answer. Run it as often as you like, check it against hidden tests, and open the hints or the model answer when you want them.
- Batch records by count and size Batching, Lists · data engineer
- Claim amounts in bands Binning, Grouping · data analyst
- Clean typed property references Cleaning, Data quality, Aggregation, NULLs · data engineer and data analyst
- Duplicate meter readings Aggregation, Deduplication, NULLs, Data quality · data analyst and data engineer
- Each claim’s share of its region Grouping, Percentages · data analyst
- Early, on time or late Filtering, Aggregation, NULLs · data analyst
- Fix the AI’s no-show report Debugging, Aggregation, Percentages, Filtering · data analyst
- Fix the Ashgrove repairs query Debugging, Joins, NULLs, Dates and times · data analyst and data engineer
- Fix the on-time returns query Debugging, Conditional aggregation, Percentages, NULLs · data analyst
- Match rent payments to stalls Merging, Data quality · data analyst and data engineer
- Members who didn’t come back Anti-joins, Dates and times, NULLs, Subqueries and CTEs · data analyst
- Merge rail closures Intervals, Sorting, Dictionaries · data analyst and data engineer
- Merge sorted feeds into one Sorting, Lists · data engineer
- Missed bin hotspots Aggregation, Filtering, Dates and times · data analyst and data engineer
- Month-end balances by product Reshaping, Grouping, Dates · data analyst
- Monthly online revenue Filtering, Merging, Group by, Dates · data analyst
- Most common words in feedback Dictionaries, Sorting, Parsing · data analyst and data engineer
- Net card takings by stall Cleaning, Grouping · data analyst
- Parcels with no matching depot Anti-joins, NULLs, Aggregation, Data quality · data analyst and data engineer
- Quiet times for card payments Conditional aggregation, Dates and times, NULLs, Aggregation · data engineer and data analyst
- Quoted fields in a claims CSV Parsing, Dictionaries, Data quality · data engineer
- Remove duplicate events Sets, Lists, Data quality · data engineer
- Routes with no breakdowns Anti-joins, NULLs, Dates and times · data analyst and data engineer
- Seats sold for every performance Joins, NULLs, Aggregation · data analyst and data engineer
- Share of gifts by payment method Percentages, Aggregation, Subqueries and CTEs, Dates and times · data analyst
- Top three customers by spend Joins, Aggregation, Filtering, Sorting and limits · data analyst and data engineer
- Calls per 15 minutes Dates, Dictionaries, Sorting · data analyst and data engineer
- Check records against a schema Validation, Dictionaries, Data quality · data engineer
- Claim references from emails Cleaning, Data quality · data analyst and data engineer
- Classes taken by the same members Joins, Deduplication, Aggregation, NULLs · data analyst
- Clean a meter readings file Parsing, Validation, Dictionaries, Data quality · data engineer
- Clinic outcomes and DNA rates Reshaping, Grouping, Percentages · data analyst
- Current state from a change feed Deduplication, Window functions, Ranking and ties, Subqueries and CTEs · data engineer
- Data quality checks with reasons Data quality, NULLs, Subqueries and CTEs, Aggregation · data engineer
- Double-booked consulting rooms Joins, Dates and times, NULLs, Data quality · data engineer
- Fetch every page from an API Deduplication, Dictionaries, Sets · data engineer
- Fix a merge that double counts Debugging, Merging, Data quality · data analyst and data engineer
- Fix the AI’s café orders query Debugging, Joins, Aggregation, Subqueries and CTEs · data analyst and data engineer
- Fix the attendances summary Debugging, Grouping, Dates, Data quality · data analyst and data engineer
- Fix the depot delivery summary Debugging, Joins, Deduplication, Dates and times · data analyst and data engineer
- Flatten nested JSON records Parsing, Dictionaries · data engineer
- Grants by financial year Dates, Grouping, Cleaning · data analyst
- Incremental load with a watermark Incremental loads, Filtering, Subqueries and CTEs, Sorting and limits · data engineer
- Insert, update or skip each row Joins, NULLs, Incremental loads · data engineer
- Latest status of each claim Deduplication, Ranking and ties, Data quality · data analyst and data engineer
- Library visits month on month Grouping, Dates, Percentages, Merging · data analyst
- Month-on-month change in journeys Window functions, Dates and times, Percentages, NULLs · data analyst
- New app users day by day Running totals, Window functions, Deduplication, Percentages, NULLs · data analyst and data engineer
- Online requests for every day Subqueries and CTEs, Dates and times, Joins, NULLs, Aggregation · data engineer and data analyst
- Repair spend by financial year Dates and times, Aggregation, Window functions, Percentages, Joins · data analyst
- Rolling 7-day average takings Window functions, Running totals, Dates and times, Aggregation · data analyst
- Row count drops between loads Window functions, Data quality, Percentages · data engineer
- Sessions from app events Sessions, Sorting, Dictionaries, Sets · data analyst and data engineer
- Sign-ups by first-touch channel Window functions, Joins, Ranking and ties, Percentages, NULLs · data analyst
- Sliding window rate limit Rolling windows, Dictionaries, Lists · data engineer
- Task runs from a scheduler log Parsing, Dictionaries, Data quality · data engineer
- The four-hour standard Conditional aggregation, Dates and times, Percentages · data analyst
- Time spent in each repair status Window functions, History tables, Dates and times, NULLs, Aggregation · data engineer and data analyst
- Top two sellers in each shop Ranking and ties, Window functions, Aggregation · data analyst
- Weekly sales from till exports Cleaning, Dates, Reshaping, Grouping · data analyst
- When each appeal hit its target Running totals, Window functions, Joins, Dates and times · data analyst
- Average daily savings balance Dates, Reshaping, Grouping, Data quality · data analyst and data engineer
- Compare two account snapshots Dictionaries, Sets, Data quality · data engineer
- Each member’s longest gym streak Gaps and islands, Window functions, Dates and times, Ranking and ties, Deduplication · data analyst and data engineer
- Idempotent upserts and deletes Dictionaries, Deduplication, Data quality · data engineer
- Median and 90th percentile waits Window functions, Conditional aggregation, NULLs, Dates and times · data analyst
- Month-one retention by cohort Dates and times, Joins, Percentages, Subqueries and CTEs · data analyst
- Price usage from a tariff history History tables, Joins, NULLs, Conditional aggregation, Dates and times · data engineer
- Probable duplicate members Deduplication, Data quality, Window functions, NULLs, Ranking and ties · data engineer
- Rate in force for each deposit Merging, Dates, History tables · data analyst and data engineer
- Reconcile card settlements Joins, NULLs, Data quality, Aggregation · data engineer and data analyst
- Run order for pipeline tasks Sorting, Dictionaries, Sets · data engineer
- Seven-day average takings Rolling windows, Dates, Grouping, Reshaping · data analyst
- Tariff history from snapshots Gaps and islands, Window functions, History tables · data engineer
- The booking funnel Conditional aggregation, Window functions, Percentages, NULLs, Dates and times · data analyst
How to practise
Solve it, then
In a technical interview, the answer is only half of it. Interviewers want to hear how you got there, what you checked and what you’d do differently with more data.
Read the data first
Look at the tables and a few rows before you write anything. Most wrong answers come from a wrong assumption about the data.
Run it early and often
Build your answer a step at a time, running it as you go, the way you would with an interviewer watching.
Check the edge cases
The hidden tests try the awkward cases: ties, missing values, refunds, empty input. Think about them before you check.
Explain it out loud
Each challenge ends with the follow-up questions an interviewer would ask. Say your answers out loud, then practise technical questions on camera for written feedback.
Not sure where to start? Follow the two-week SQL interview plan
Not sure where your SQL is yet? Take the free 20-minute SQL and skills test on Deeplink Toolkit. Want a coach to work through it with you? Deeplink Coaching offers data career coaching for graduates. Every name and number in the challenges is invented.