Data Analyst Interview Questions and Answers
26 questions to prepare for your Data Analyst interview
Overview
Most of a data analyst interview probes whether your numbers can be trusted and whether you can explain them. Expect SQL on joins, NULLs, grouping and window functions, some Excel, basic statistics, and a case such as working out why sign-ups fell. Entry-level candidates are often asked to walk through a course or portfolio project in place of work experience, so choose one you can defend line by line. The technical step varies most between employers: it may be a timed SQL test before any interview, queries written live while you explain your thinking, or a dataset to analyze at home and present to the team.
Practise SQL by typing queries rather than reading them: load a public dataset into PostgreSQL or SQLite and write joins, aggregations and window functions until you can explain every line. Choose two projects you can walk through from question to finding, and bring a link or a printed one-page summary of each. Prepare short stories for a mistake of your own you found and fixed, a vague request, two deadlines that clashed and a result you presented. Read the posting for the stack (Power BI or Tableau, a warehouse such as Snowflake or BigQuery, Python or R) and the business area, then list the metrics that team probably watches.
Get Your Free Data Analyst Interview Prep Guide
Get practical tips, sample answers, and a checklist to prepare for your interview.
No spam. Unsubscribe anytime. We respect your privacy.
How to answer
This shows your whole method, so tell it in order: the question and who asked it, the data source, how you cleaned it, the analysis itself (the queries, the comparison, any test), what you found and what happened next. Entry-level candidates can use a course or portfolio project, as long as you can say why the question mattered and who would use the answer. Name the tools and one judgment call, such as excluding a partial month from a trend. Pitfall: spending the answer on the tools and never stating the finding.
How to answer
The interviewer wants a process you can repeat. Name the steps: keep the raw file untouched and work on a copy; profile it (row count, column types, ranges, distinct values); fix types such as dates stored as text; standardize text by trimming spaces and settling on one spelling per category; decide on missing values field by field and write down why; remove true duplicates; reconcile totals with the source. Sample outline: '[1,200] rows, dates in [three] formats, [40] repeated IDs from a double export.' Pitfall: fixing cells by hand so the cleaning cannot be rerun next month.
How to answer
Requests often arrive as 'can you pull the numbers on X'. Show that you clarify before you query: ask what decision the numbers will support, who will see them, the time period, the definitions (what counts as an active customer) and the deadline. Confirm the scope in writing and share a rough draft early. Sample outline: a manager asked for churn by region; you learned they were placing [two] retention staff, so you added customer counts beside the rates. Pitfall: delivering exactly what was asked and learning later it answered the wrong question.
How to answer
The interviewer is checking honesty and what changed afterwards. Choose a real, specific error: a BETWEEN filter on a timestamp that dropped most of the month's last day, test accounts left in a customer count, an average of regional averages reported as the overall average. Explain how it surfaced, how fast you told the people using the numbers, how you corrected and reissued the work, and the habit you kept, such as a colleague reviewing any query behind a recurring report. Pitfall: blaming the data source when the cause was a check you skipped.
How to answer
Show a method. List the requests, ask each requester when they truly need the result and which decision it feeds, then rank by business impact and deadline. When two senior people both call their request urgent, agree the order with your manager instead of choosing yourself. Tell anyone who has to wait, with a new date, before their deadline passes. A strong close mentions how you cut repeat requests, such as building a self-serve report for a question you kept answering. Pitfall: saying yes to everything and working late, which suggests you cannot set priorities.
How to answer
Tools vary between employers, so the interviewer is checking how you learn. Name the tool (DAX in Power BI, pandas, a new SQL dialect such as BigQuery's), why you needed it, how you learned it (official documentation, rebuilding a report you already understood, a colleague reviewing your first attempt) and what you delivered. Sample outline: 'The course used Python and I only knew Excel, so I rebuilt my pivot table analysis in pandas and checked the totals matched.' Pitfall: claiming mastery in a weekend instead of saying what you can do now and what you are still learning.
How to answer
The interviewer wants habits you already follow with personal information. Describe the data (customer emails, health or payroll records), then what you did: pulled only the fields the question needed, joined on IDs instead of names, reported counts by group and suppressed groups small enough to identify someone, and kept files in approved storage, never in personal email or on a USB key. With no work example, use a course project that handled survey or health data, or name the steps you would follow. Pitfall: saying you would leave privacy to IT or legal.
How to answer
An INNER JOIN returns only rows that match in both tables. A LEFT JOIN keeps every row from the left table and fills the right table's columns with NULL where nothing matches. Either join repeats a left row once per match, so a customer with [three] orders appears [three] times. To count paid orders per customer and keep customers with none, put o.status = 'paid' in the ON clause and use COUNT(o.order_id), which returns 0 where COUNT(*) returns 1. Pitfall: putting that filter in WHERE, which drops the NULL rows and turns it into an inner join.
How to answer
WHERE filters individual rows before grouping. HAVING filters groups after GROUP BY has aggregated them, so only HAVING can test an aggregate result. Explain the logical order a query is evaluated in: FROM and joins, WHERE, GROUP BY, HAVING, SELECT, ORDER BY, then LIMIT. That order is why most databases will not let you use a SELECT alias in WHERE. Sample: SELECT region, SUM(amount) FROM sales WHERE sale_date >= [start_date] GROUP BY region HAVING SUM(amount) > [50000]. Pitfall: writing WHERE SUM(amount) > [50000], which fails because no aggregate exists yet at the WHERE step.
How to answer
GROUP BY collapses rows to one per group; a window function calculates across related rows and keeps every row. For each customer's latest order, compute ROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY order_date DESC, order_id DESC) AS rn in a CTE and keep rn = 1 in the outer query, since window functions run after WHERE (Snowflake and BigQuery also accept QUALIFY). For revenue to date: SUM(amount) OVER (ORDER BY order_date, order_id ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW). Pitfall: dropping the tiebreaker or the frame; the default RANGE frame adds every row sharing a date at once.
How to answer
NULL means missing or unknown, so any comparison with it, even NULL = NULL, evaluates to unknown and the row is filtered out; test with IS NULL or IS NOT NULL. That also means WHERE status <> 'cancelled' silently drops rows where status is NULL. Aggregates skip NULLs: COUNT(*) counts rows, COUNT(column) counts non-null values, and AVG divides by the non-null count. COALESCE(discount, 0) supplies a default, but only use it when zero is the true meaning. Pitfall: WHERE id NOT IN (subquery) returns nothing if the subquery yields a single NULL; use NOT EXISTS.
How to answer
Define a duplicate first: the same customer_id, or the same email after trimming and lowercasing. Find them with GROUP BY on those columns and HAVING COUNT(*) > 1. To pick a survivor, number the copies in a CTE (a named subquery written with WITH that lasts for one statement) using ROW_NUMBER() by key, newest updated_at first. Write the rows numbered 1 to a clean table, or delete the rest from the source with the owner's approval. Then trace the cause, such as a file loaded twice. Pitfall: SELECT DISTINCT, which removes only rows identical in every selected column.
How to answer
A pivot table summarizes a list by placing fields in rows, columns, values and filters; build it on an Excel Table (Ctrl+T on Windows) so new rows are included, and refresh it after edits. XLOOKUP (Microsoft 365 and Excel 2021 or later) returns the matching item from another range, matches exactly by default, and its if_not_found argument shows text such as 'Missing' in place of #N/A. Data validation limits what a cell accepts, such as a drop-down of province codes. Pitfall: a value field showing Count instead of Sum, a sign the column holds blanks or text.
How to answer
Interviewers want this tied to skew. A few large values pull the mean up; the median, the middle value, barely moves. In right-skewed data such as income, the mean usually sits above the median, so report the median or both. Standard deviation, the typical distance from the mean, is inflated by the same extreme values, so pair the median with the interquartile range (IQR). Flag outliers with a stated rule, such as more than 1.5 times the IQR below Q1 or above Q3, then check whether each is an error or a real large customer. Pitfall: deleting outliers silently.
How to answer
Cover one change, a primary metric fixed in advance, random assignment to control or variant, and a sample size set before launch from the baseline rate, the smallest lift worth detecting (smaller lifts need larger samples), the significance level (often 0.05) and power (often 0.8). Run whole weeks so weekday patterns even out. A p-value is the probability of a result at least as extreme as the observed one if the change had no effect. It is not the chance the variant is better, and it does not measure effect size. Pitfall: stopping as soon as p drops below 0.05.
How to answer
Walk through a real sequence: pd.read_csv with dtype and parse_dates set; df.info() and df.describe() to check types and ranges; df.isna().sum() to count missing values, then dropna, fillna or a flag column depending on why each is missing; df.drop_duplicates(subset=[...]) on the business key; pd.merge(orders, customers, on='customer_id', how='left', validate='many_to_one'), which raises an error if customer IDs repeat on the right; then df.groupby('region')['revenue'].agg(['sum', 'median']). Keep the steps in a script or notebook so they can be rerun. Pitfall: chained assignment such as df[df.x > 0]['y'] = 0, which leaves df unchanged; write df.loc[df.x > 0, 'y'] = 0.
How to answer
State your order before you start. Check the data first: confirm tracking still fires after the latest release and that the drop appears in the source database too. Size it against normal weekly movement and the same week last year, allowing for holidays. Split sign-ups by channel, device, region and landing page; a drop confined to one segment, such as paid Android traffic, points to a cause. Walk the funnel (visits, form starts, completions) to see where people stop, and line the timing up with releases, campaigns and outages. Pitfall: listing causes with no order of attack.
How to answer
This tests correlation versus causation. Your most loyal, highest-spending customers may be the ones who install the app (selection bias), in which case moving others to it could change little. Say what you would check: the same customers' spending before and after they installed it, and app users compared with non-users matched on past spend and tenure. Better still, propose a test: send an app promotion to a random half of a customer group and compare both halves' spending over [eight] weeks. Then give a recommendation. Pitfall: saying correlation does not prove causation and stopping there.
How to answer
Start with the decision the number supports: what the manager will do differently if it rises or falls. Then define it precisely: who counts (logged-in customers, excluding staff accounts), what counts as engaged (for example, [two] or more sessions in a rolling [seven] days), the period and the data source. Add a counter-metric so it is harder to game, such as unsubscribes beside email opens. Measure a baseline before anyone sets a target, and document the definition. Pitfall: choosing a number that can only grow, such as total sign-ups to date.
How to answer
Treat finance's figure as the reference until you can explain the gap, and reconcile instead of guessing. Compare definitions: gross or net of refunds, discounts and tax; order date or payment date; the time zone used for the month boundary; currency conversion; test transactions. Then compare at finer grain, by day and then by transaction, until the difference is accounted for. Tell the people who use the dashboard early that you are checking. Record the cause, then align your definition or label the dashboard clearly. Pitfall: forcing the totals to agree with an adjustment you cannot explain.
How to answer
Lead with the answer and the decision you need, then two or three supporting points with one chart each, then caveats and next steps. Give each chart a title that states the finding, such as 'Returns rose after the policy change'. Put statistics in plain words: how confident you are and what would change the conclusion, with no p-values on the slide. Keep the method in an appendix for questions. Sample opening: 'I recommend we [extend the trial to all regions], for three reasons.' Pitfall: presenting in the order you did the work, which buries the result.
How to answer
Ask the team lead what they manage day to day, then choose measures: ticket volume, backlog, median first-response and resolution times, and satisfaction scores. Model the data as a star schema, one ticket fact table joined to date, agent and category dimension tables, and in Power BI write totals as DAX measures rather than calculated columns. Pick each chart for its question: a line for trends, a sorted horizontal bar to compare agents or categories, a table for exact values. Start bar axes at zero and show the last refresh time. Pitfall: a pie chart with many slices.
How to answer
This question tests whether you know what the job involves day to day: cleaning data, answering ad hoc questions, maintaining reports and explaining results to people who will act on them. Give a specific origin, such as a course project, a spreadsheet you built in a previous job, or a question you answered with data that changed a decision. Connect it to this team's area (marketing, operations, finance, product) and to something in the posting about their data or customers. Pitfall: 'I love numbers', an answer that fits bookkeeping as well as analysis.
How to answer
Pick a real gap outside the core of this posting: if the role centres on SQL and Power BI, that might be Python, inferential statistics or a cloud warehouse. Say what you can do today, how you are closing the gap (a course, a project, practice problems) and how far along you are. This checks honesty about your level. Sample outline: 'SQL and Power BI are daily tools for me; in Python I can clean a CSV with pandas and am rebuilding one Excel report in a notebook.' Pitfall: a disguised strength, or a core skill of the job.
How to answer
For entry-level candidates this is where coursework counts, provided you turn it into work examples. Name specific courses and what you produced in them: a regression in a statistics course, a database design project, a dashboard for a capstone client. Say what data you used, which tools, and what the result showed, then link each one to a task in the posting. Admit that classroom data tends to be cleaner than workplace data and describe how you practised on messier public data. Pitfall: listing course titles and grades without a single thing you made.
How to answer
Ask about the data and how work reaches you, which shows you know what makes the job hard. Questions to adapt: 'Where does the team's data live, and who maintains it?' 'How do requests reach the team: a ticket queue, direct messages, a planning meeting?' 'How are metric definitions agreed and written down?' 'Which teams would I support most?' 'What would a good first project look like?' Pitfall: asking which tools the team uses when the posting already lists them, which tells the interviewer you did not read it closely.
Practice with AI
Get personalized feedback on your answers with our AI-powered mock interview simulator.
Start Free PracticeKey Skills to Highlight
Question Categories
behavioral
Questions about your past experiences and how you handled specific situations
technical
Questions about your technical skills, knowledge, and expertise
situational
Hypothetical scenarios to assess how you would handle future challenges
general
Common questions about your background, goals, and fit for the role
Related Interview Guides
More Technology & Software Interview Guides
Explore 24 more technology & software resources.
Frequently Asked Questions About Data Analyst Interviews
What does the SQL test in a data analyst interview look like?
Find out beforehand whether you can run your queries or must write them without running them, and which dialect the test uses (PostgreSQL, SQL Server, BigQuery or another), since date functions differ between them. The schema is usually small, such as customers, orders and products, and the tasks tend to cover joins, grouping, a window function and a NULL or duplicate trap. Say your assumptions aloud, and check row counts and a few output rows against what you expect before you call it finished.
How should I approach a take-home assignment for a data analyst job?
Answer the question the brief asks, and if it gives a time limit, keep to it and note what you would do with more time. Put the findings and a recommendation at the top, then cleaning steps and assumptions, then the detail. Submit work someone else can rerun, such as a commented SQL file or notebook, and never use data from a current or former employer.
What is the difference between a data analyst, a business analyst and a data scientist?
A data analyst answers business questions with existing data through queries, reports, dashboards and explanations of what changed. A business analyst usually works on processes and requirements for systems or projects, though the titles overlap at many employers. A data scientist more often builds predictive models and is expected to have deeper statistics and programming, so read the duties in the posting rather than the title.
Do entry-level data analyst jobs require Python?
It depends on the posting. Some junior roles ask for SQL and Excel and list Python or R as an asset, while others test Python directly; the required-skills section of the posting tells you which. If Python is listed, be ready to load a CSV, filter, group and merge in pandas, and say honestly how much you have used it.
What should an entry-level data analyst portfolio include?
Two or three complete projects are more useful than many fragments. Each should state a question, link to its source, such as a Statistics Canada data table, the federal Open Government Portal or a city open data portal like Toronto's or Vancouver's, and show the cleaning and analysis in code or a workbook. End each with a short written finding and one clear chart, and host the set on GitHub or a simple web page you can share.
Ready to Ace Your Data Analyst Interview?
Create a free JobEase account to practise your answers.