Data analyst technical interview questions
Practice data analyst technical interview questions and answers with SQL and Excel tasks, checked results, and clear steps to defend your metric calculations.

These 10 data analyst technical interview questions and answers cover defining metrics, cleaning data, calculating results in SQL and Excel, and explaining analytical limits. Each question includes a model answer and what the interviewer listens for, using one fictional Philippine support-ticket case so you can check every calculation.
Technical answers with checked results
A strong technical answer connects the business question, the eligible records, and the calculation. The data grain, meaning what one row represents, is one ticket; NULL means a value is missing.
ticket_id | status | resolution_minutes
101 | closed | 10
102 | closed | 40
103 | closed | NULL
104 | closed | 20
105 | open | NULL
Before calculating, build an eligibility ledger: a record of which tickets belong in each count and why. The denominator is the total eligible population; the numerator is the eligible subset meeting the target. Here, eligibility requires closed status and a recorded duration. For this fictional exercise, a ticket meets the target when its recorded resolution time is at most 30 minutes.
Ticket | Status | Minutes | Denominator | Numerator | Exclusion reason
101 | closed | 10 | yes | yes | none
102 | closed | 40 | yes | no | none
103 | closed | NULL | no | no | missing duration
104 | closed | 20 | yes | yes | none
105 | open | NULL | no | no | still open
Separately, only three of four closed tickets have recorded durations. The measured-ticket rate doesn't establish performance across every closed ticket because ticket 103's duration is unknown.
Rehearse each question aloud before reading its model answer. For the practical tasks, write your own solution and compare the included records as well as the final result.
Data structure and missing values
Data structure and missing-value checks establish whether the records support the metric you're about to report.
1. Row meaning and unique identifiers
Interviewer: “What does one row represent, and why would you check that before analyzing these tickets?”
Model answer: “One row represents one ticket. I'd confirm that ticket_id uniquely identifies each ticket before counting tickets or averaging durations. If the source stores status changes instead, several rows could describe the same ticket, so counting rows would overcount tickets.”
The interviewer listens for a clear grain definition and recognition that a database row isn't always a separate business event.
2. Missing resolution times
Interviewer: “How would you handle the missing resolution times?”
Model answer: “Ticket 105 is still open, so a completed resolution duration isn't available yet. Ticket 103 is closed but lacks a recorded duration. I wouldn't replace either value with zero. I'd exclude ticket 103 from the measured-ticket calculation, disclose the missing closed duration, and investigate the recording issue.”
The interviewer listens for the distinction between missing, zero, and not yet applicable. Zero would incorrectly make either ticket look instantly resolved.
Practice what this post teaches
Cleaning decisions and summary statistics
Cleaning rules and summary statistics need to preserve the meaning of the tickets, not merely produce tidy output.
3. Duplicate ticket records
Interviewer: “You find two rows with the same ticket ID. Would you delete one?”
Model answer: “Not automatically. I'd inspect the source grain, timestamps, and conflicting fields. An exact repeated import may be removable, but two status events could both be legitimate. I'd document a selection rule, preserve the source records, and reconcile ticket counts before and after cleaning.”
The interviewer listens for a defensible rule rather than automatic duplicate removal. Keeping the latest row also needs justification: the latest event might not contain the original resolution duration.
4. Mean and median
Interviewer: “Would you summarize resolution time with the mean or the median?”
Model answer: “The recorded durations are 10, 20, and 40 minutes. Their mean is 70 divided by 3, about 23.33 minutes; their median is 20 minutes. The mean uses every duration and is sensitive to unusually long cases. I'd choose the summary that fits the question and report the observation count.”
The interviewer listens for interpretation, not definitions alone. Three measured tickets aren't enough to establish typical long-term team performance.
SQL calculation and filtering
SQL filtering should establish the eligible population before calculating the percentage.
5. Within-target percentage
Interviewer: “What percentage of closed tickets with a recorded duration were resolved within 30 minutes?”
Model solution, using PostgreSQL: the eligible common table expression, a named intermediate query, fixes the denominator before aggregation.
WITH tickets(ticket_id, status, resolution_minutes) AS (
VALUES
(101, 'closed', 10),
(102, 'closed', 40),
(103, 'closed', NULL),
(104, 'closed', 20),
(105, 'open', NULL)
), eligible AS (
SELECT resolution_minutes
FROM tickets
WHERE status = 'closed'
AND resolution_minutes IS NOT NULL
)
SELECT ROUND(
100.0 * COUNT(*) FILTER (WHERE resolution_minutes <= 30)
/ NULLIF(COUNT(*), 0),
2
) AS within_target_pct
FROM eligible;
within_target_pct
66.67
The interviewer listens for matching populations, decimal arithmetic, and protection against division by zero. FILTER restricts the numerator; COUNT(*) counts all eligible rows. NULLIF turns a zero denominator into NULL, so an empty eligible population returns NULL rather than a misleading zero percentage.
After checking the query, rehearse your explanation through Technical interviews practice.
6. Row filters and group filters
Interviewer: “What's the difference between WHERE and HAVING?”
Model answer: “WHERE filters individual rows before grouping. HAVING filters groups after aggregation. For a branch report, I'd filter eligible ticket rows with WHERE, group them by branch using GROUP BY, and use HAVING if the report requires a minimum measured-ticket count.”
The interviewer listens for the order of operations and a concrete example tied to the metric.
Excel calculation and reconciliation
Excel and SQL should agree when both calculations use the same eligible records, data types, and target boundary.
7. Matching percentage in Excel
Interviewer: “Calculate the same percentage in Excel using only the eligible ticket durations.”
Use Excel with English function names and US regional settings. Paste the following eligible durations into A1, then enter the formula below in C2.
resolution_minutes
10
40
20
=COUNTIF(A2:A4,"<=30")/COUNT(A2:A4)
Format C2 as Percentage with two decimal places. The displayed result is:
66.67%
Model answer: “COUNTIF counts the two durations at or below 30. COUNT counts the three numeric durations.” The interviewer listens for a defined input population and correct formatting.
8. Conflicting tool results
Interviewer: “Excel and SQL give different percentages. How would you investigate?”
Model answer: “I'd reconcile the inputs before changing either calculation.” Use the following sequence:
Reconciliation sequence
- Compare included ticket IDs, not just row counts.
- Compare numerator and denominator counts separately.
- Check data types: Excel COUNT ignores text, including durations stored as text.
The interviewer listens for a repeatable investigation. The short Excel formula assumes the range already contains only eligible numeric durations; the formula doesn't enforce the ticket-status rule.
Now rehearse the calculation and reconciliation answers through Data analyst interview practice. The Work Gym's Interview Hub offers spoken and typed practice interviews with a written report.
Statistical judgment and trend checks
Statistical judgment means separating what the results show from explanations the available data can't establish.
9. Association and causation
Interviewer: “Tickets with longer resolution times have lower customer ratings. Does that prove slow handling caused the lower ratings?”
Model answer: “No. An association, meaning two measures vary together, doesn't establish cause. Complex tickets could take longer and receive lower ratings. Customers who submit ratings may also differ from customers who don't.”
The interviewer listens for plausible alternative explanations and restrained conclusions.
10. Monthly performance changes
Interviewer: “The within-target percentage fell this month. How would you determine whether team performance got worse?”
Model answer: “I'd confirm that both months use the same eligibility rule and reporting window, then compare missing-duration coverage and ticket counts. Next, I'd split results by comparable ticket types or queues. A larger share of complex tickets can lower the overall percentage even when each queue's performance is unchanged.”
The interviewer listens for a distinction between workload composition, meaning the mix of ticket types, and changes within comparable groups. Finish by stating any remaining uncertainty, especially when missing durations could change the conclusion.
Common questions
Which technical skills should an entry-level data analyst prepare for an interview? Prepare SQL filtering and aggregation, spreadsheet calculations, data-quality checks, and basic statistical interpretation. Practice explaining the eligible population and validating a result, not just recalling function names.
How should I explain a SQL solution during a technical interview? Start with what one row represents, then define the eligible population, numerator, and denominator. Walk through the query in that order and finish with a checked result and any limitations.
What should I do when an interview dataset has missing values? Identify why each value is missing before choosing a treatment. Distinguish unknown values from values that aren't yet applicable, disclose exclusions, and don't replace missing values with zero without a business justification.
How can I check whether my Excel and SQL results answer the same question? Compare included record IDs and numerator and denominator counts before comparing percentages. Then check data types, boundary conditions, filters, and rounding so matching displays don't hide different calculations.