SQL interview practice for data science
Answer product questions in SQL or pandas while Vera listens. Where a question comes with tables, your query runs on them and the result table appears; Vera then asks about ties, NULLs, rows a join can duplicate, and how you would check the answer.
- 45 min
- Two at regular, one deeper at lead
- Up to three small nudges
- SQL (a PostgreSQL-like dialect) or pandas
How the round runs
- 01
Approach
Ask what one row of the answer stands for, how ties count and what to do with missing values, then say your plan before you type. Vera answers from the question’s notes and does not suggest the approach.
- 02
Implementation
Write the query or the pandas code while you talk, and run it. Vera reads what you wrote and the result table, and stays mostly quiet while you work.
- 03
Testing and follow-ups
Name the edge cases (ties, NULLs, empty input, duplicates from a join) and say how you would check the result, then take a follow-up, for example the same answer in pandas or what changes on a much larger table. At lead level Vera also asks what changes in production.
What the report scores
Each skill gets a score from 1 to 5 against the bar for your level, with the quotes it is based on and the time you said them. The report ends with one thing to fix next.
- Problem solving
- Code quality and correctness
- Complexity and optimization
- Testing and edge cases
- Communication
At lead level, also: Production thinking.
How the real round works
The SQL round of a data science interview usually gives you 30 to 60 minutes and one to three problems in a shared editor, often with the choice of SQL or pandas. The guides we read agree that it rewards the right grain, joins that do not duplicate rows and edge cases said out loud (NULLs, ties, duplicates, empty input) far more than dialect trivia. Window functions and retention or cohort queries are the themes reported most.
How data science SQL interviews work: structure, signals and common mistakesRegular and lead level
- Regular
- Two problems. The bar is a correct query that handles the edge cases, explained clearly, with a sensible check on the result. Recovering well after a hint counts.
- Lead
- One problem taken further, with harder variants once it works, plus production questions: scale, failure and how you would watch the data.
Length: 45 minutes at either level.
See the feedback before you start
Full reports from the real report pipeline, for a fictional student and a scripted interview.
Questions
Which SQL dialect is it?
A PostgreSQL-like dialect with window functions and common table expressions. Vera judges the logic and the edge cases, not dialect details.
Can I answer in pandas instead of SQL?
Yes, unless the question asks for one of them. The editor runs pandas and NumPy too, and some questions come with small data files to read.
Is it all SQL?
Mostly SQL and pandas: window functions, joins, retention, funnels, sessions and deduplication. Some problems ask for a statistic or a small simulation in Python code instead.
What does the report score?
The same skills as every coding round: problem solving, code quality and correctness, complexity, testing and edge cases, and communication, plus production thinking at lead. Each score quotes what you said.