Interview quizzes

Data Analyst Interview Questions Quiz: 10 SQL and Scenario Questions

Data analyst interviews mix technical questions, usually SQL, with questions about how you handle messy data and explain results to people who don't work with data. Each question below has four possible answers. Pick the best one, then read the explanation to see why it works.

Data Analyst Interview Questions Quiz

10 questions · about 5 minutes · instant feedback after every answer

All questions

  1. A query LEFT JOINs customers to orders on customer_id, groups by customer, and selects COUNT(o.order_id). What does it return for a customer with no orders?
    • A. 0, because COUNT on a column skips the NULL that the LEFT JOIN creates
    • B. 1, because the LEFT JOIN still produces one row for that customer
    • C. NULL, because there are no matching orders to count
    • D. Nothing, because customers with no orders are dropped by the join before the GROUP BY runs
    Show the best answer

    A. A LEFT JOIN keeps every customer and fills the order columns with NULL when there's no match. COUNT(column) ignores NULLs, so the result is 0. COUNT(*) would count the row itself and return 1, which is a common interview trap.

  2. You LEFT JOIN customers to orders, then add WHERE o.order_date >= '2026-01-01'. Customers with no 2026 orders disappear from the results. Why?
    • A. LEFT JOIN only keeps unmatched rows when the query has no WHERE clause at all, so any filter will drop customers without orders no matter where it's placed.
    • B. The date needs to be cast to a timestamp before it can be compared to a string.
    • C. GROUP BY removes rows with NULL values, so those customers were filtered out during aggregation instead.
    • D. The WHERE filter rejects the NULL order dates, so it acts like an inner join. Move the condition into the ON clause.
    Show the best answer

    D. For unmatched customers, o.order_date is NULL, and a comparison with NULL is never true, so WHERE removes those rows. Putting the date condition in the ON clause filters orders before the join and keeps every customer. Interviewers ask this to see whether you understand how joins and filters interact.

  3. You need total sales by region, but only for regions with more than $50,000 in sales. Where does the $50,000 condition belong?
    • A. In the WHERE clause, as WHERE sales > 50000
    • B. In a HAVING clause after GROUP BY, as HAVING SUM(sales) > 50000
    • C. In the ORDER BY clause, so the largest regions come first and you can stop reading at $50,000
    • D. In a subquery that filters out any individual sale under $50,000 before grouping
    Show the best answer

    B. WHERE filters individual rows before grouping, while HAVING filters groups after aggregation, so a condition on SUM(sales) goes in HAVING. WHERE sales > 50000 or a subquery on single sales would keep only large individual transactions, which answers a different question.

  4. You join orders to order_items (one order has many items), then SUM(orders.shipping_fee). The total is much higher than finance reports. What is the most likely cause?
    • A. SUM ignores NULL shipping fees, which pushes the total up.
    • B. Finance is probably using a different currency conversion for the same period.
    • C. The join repeats each order's shipping fee once per item, so the fee is counted multiple times.
    • D. The query needs an ORDER BY so the database adds the rows in the correct sequence, otherwise the sum can drift from run to run.
    Show the best answer

    C. Joining across a one-to-many relationship repeats the "one" side, so order-level values get summed once per item. Sum shipping fees from the orders table alone, or aggregate items to the order level before joining. Checking row counts before and after a join catches this quickly.

  5. About 12 percent of rows in a customer survey are missing the income field. What is the best first step?
    • A. Fill the blanks with 0 so every row can be used in the analysis.
    • B. Delete every row with a missing value, since incomplete data is unreliable and keeping it could bias the averages you report.
    • C. Fill the blanks with the overall average income so the dataset is complete and the mean stays the same.
    • D. Check whether those rows differ from the rest, such as by age or channel, then choose a method and document it.
    Show the best answer

    D. How you handle missing data depends on why it's missing. If certain groups skip the question more often, dropping or averaging can bias your results. Filling with 0 is almost always wrong for a field like income, and any choice you make should be documented.

  6. A sales director asks why a dashboard shows revenue down 8 percent. How should you present your analysis?
    • A. Lead with the main finding and its business impact in plain language, show one clear chart, and keep method details ready if they ask.
    • B. Walk through your SQL query and data cleaning steps first so they trust how the number was produced before they see it.
    • C. Send the full spreadsheet so they can explore the numbers and reach their own conclusions.
    • D. Explain the statistical tests and confidence intervals you used, because precise language prevents misunderstandings later and shows the analysis is rigorous.
    Show the best answer

    A. Non-technical stakeholders need the answer and what it means for their decisions first. Method details build trust when someone asks, but leading with them buries the finding, and a raw spreadsheet hands the analysis back to the person who asked you to do it.

  7. "How do you design a dashboard for a busy executive?" Which answer is strongest?
    • A. I include every metric the team tracks so the executive never has to ask for more data.
    • B. I use a lot of chart types and colors so the dashboard looks impressive and holds attention in meetings, and I add animations when the tool supports them.
    • C. I start by asking what decisions they make, then show a few key metrics with targets and trends at the top and details below.
    • D. I copy the layout of the last dashboard I built so everything looks consistent across the company.
    Show the best answer

    C. Good dashboards are built around the user's decisions, with the most important metrics and their context, like targets and trends, easy to scan. Too many metrics or decorative charts make the key numbers harder to find, and reusing a layout ignores what this audience needs.

  8. An A/B test of a new checkout button shows a 2 percent lift in conversion with a p-value of 0.03, using a 0.05 significance level. What is the most accurate interpretation?
    • A. There is a 97 percent chance the new button is better, so the team can expect the 2 percent lift to continue after launch.
    • B. The result is statistically significant: a difference this large would be unlikely if the buttons truly performed the same.
    • C. The lift is guaranteed to hold at about 2 percent once the button rolls out to every user, since the result passed the significance threshold.
    • D. The test proves nothing, because the lift is under 5 percent.
    Show the best answer

    B. A p-value below the chosen level means the observed difference would be unlikely if there were no real effect. It isn't the probability that the variant is better, and it doesn't guarantee the size of the lift. A strong answer also checks practical impact and whether the test ran its planned length.

  9. Before sharing a weekly report built on a new data source, which check matters most?
    • A. Make sure the chart colors match the company's brand guidelines.
    • B. Confirm the query runs in under a minute so the report refreshes quickly every morning without timing out.
    • C. Check that the report has more rows than last week's version.
    • D. Reconcile key totals against a trusted source and check for duplicates, nulls and unexpected values.
    Show the best answer

    D. Reconciling totals with a trusted source, such as a finance report, and checking for duplicates, nulls and out-of-range values catches most errors before anyone acts on bad numbers. Speed and formatting matter only after the numbers are right, and more rows can mean duplicates, not better data.

  10. You need to pull 40 million transaction rows, clean them and run the same analysis every month. Which tool choice makes the most sense?
    • A. Use SQL to filter and aggregate in the database, then Python for cleaning and a repeatable script.
    • B. Do it all in Excel, since it's what most stakeholders already know and they can check your formulas themselves.
    • C. Export everything to CSV and clean it by hand each month, so you can see every change you make to the data and catch problems before they reach the final numbers.
    • D. Use whichever tool you learned first, since all three handle any size of data the same way.
    Show the best answer

    A. SQL is built to filter and aggregate large tables where they live, and Python makes cleaning and repeat analysis scriptable. A single Excel worksheet holds just over 1 million rows, and manual monthly cleaning is slow and hard to reproduce. Excel still works well for small, one-off analyses and sharing results.

Data analyst interview questions usually come in three types: technical questions on SQL and tools, case questions where you work through a business problem, and behavioral questions about how you communicate. Interviewers care as much about your reasoning as your syntax, so talk through your thinking.

For behavioral questions, the STAR method keeps your stories focused on what you did and what changed.

What SQL questions are asked in a data analyst interview?

Expect joins, aggregation, filtering with WHERE and HAVING, and often window functions. A common trap is how a LEFT JOIN interacts with filters and COUNT, so explain your logic before you write the query. If a case question stumps you, our tips for hard interview questions help you think out loud.

To find customers with no orders this year, I'd LEFT JOIN customers to orders and put the date condition in the ON clause, not the WHERE clause. If I filter on the orders table in WHERE, the NULL rows for unmatched customers get dropped, and it behaves like an inner join. Then I'd keep only the rows where the order ID is NULL and count the customer IDs.

How do you handle missing or messy data?

Show that you investigate before you fix, and that you document your choices.

On a churn project at Contoso, about a tenth of accounts had no signup channel. Before filling anything in, I checked whether those accounts were different, and most turned out to come from an old partner system. I labeled them as their own group instead of guessing, noted it in the report, and asked the data engineering team to fix the feed.

How do you explain technical results to a non-technical audience?

Lead with the answer and what it means, then support it with one chart.

When our regional managers asked why repeat purchases dropped, I opened with one sentence: customers who waited more than five days for delivery were much less likely to buy again. I showed a single bar chart by delivery time and suggested two options to test. I kept the regression details in an appendix, and only one person asked to see them.

Tell me about a dashboard you built

Describe who used it, what decisions it supported and what changed.

I built a Tableau dashboard for the support team leads at Fabrikam. I started by asking which decisions they made each morning, and the answer was mostly staffing. So the top row showed ticket volume against forecast and backlog by queue, with drill-downs below. The leads stopped requesting a daily spreadsheet, which saved me about four hours a week.

How would you analyze an A/B test?

Cover the setup, the result and the business decision. Mention practical significance, not just the p-value.

First I'd confirm the test ran its planned length and that traffic split evenly between groups. Then I'd compare conversion rates, check the confidence interval and p-value against the threshold we set in advance, and ask whether the lift is big enough to matter for revenue. If key segments behaved differently, I'd flag that as a follow-up test rather than a conclusion.

How do you check your work before sharing it?

Interviewers want a repeatable habit, not a promise that you're careful.

I reconcile key totals against a trusted source, like the finance close numbers, and check row counts before and after every join. I scan for duplicates, nulls and values outside the expected range. For anything high stakes, I ask a teammate to review the query. That habit once caught a join that was double counting refunds before the report went to leadership.

When do you use Excel, SQL or Python?

Match the tool to the size of the data and how often the work repeats.

I use SQL to pull and aggregate data where it lives, especially for large tables. I switch to Python with pandas when the cleaning is complex or the analysis runs every month, because a script is easy to rerun and review. Excel is still my choice for quick checks on small extracts and for sharing results with people who want to explore the numbers themselves.

Practice more scenario questions in our behavioral interview quiz, and make sure your data analyst resume names the same tools and projects you plan to discuss.

Frequently asked questions

What are the most common data analyst interview questions?

Expect SQL questions on joins, aggregation and filtering, plus questions about cleaning messy data, building dashboards, interpreting A/B tests and explaining results to non-technical stakeholders. Many interviews also include a take-home or live technical exercise.

How much SQL do I need for a data analyst interview?

Be comfortable with SELECT, WHERE, GROUP BY, HAVING, the main join types, CASE statements and subqueries or CTEs. Window functions such as ROW_NUMBER and running totals come up often for mid-level roles. Practice explaining why a query works, not just writing it.

Do data analysts need to know Python?

It depends on the role. Many analyst jobs center on SQL, Excel and a BI tool such as Tableau or Power BI, while others expect Python or R for cleaning and statistics. Read the job posting closely and be honest about your level with each tool.

How do I answer data analyst questions with no experience?

Use projects built on public datasets, coursework or a process you improved with data in another job. Walk through the question, the data, your method and what you found, and share a portfolio link if you have one.

Answer guides for this quiz