InterviewStack.io LogoInterviewStack.io

SQL for Data Analysis Questions

Writing SQL to answer analytical and business questions. Covers filtering, joins, grouping and aggregation, subqueries, CTEs, and translating an ambiguous request into a correct query. Includes spreadsheet-to-SQL fluency for everyday analyst workflows.

HardTechnical
70 practiced

Your pipeline-based revenue forecast has been underestimating actual realized revenue by about 20% historically. Describe the SQL-driven analyses you'd run to diagnose likely root causes (for example win-rate by stage, close-date slippage, discounting), and propose one or two SQL metrics to track whether it improves.

MediumTechnical
63 practiced

If you had a transaction-level sheet and needed a monthly summary by region, product, and channel with trend lines, how would you build the PivotTable and what options would you use to make it usable for non-technical stakeholders?

HardTechnical
72 practiced

Given transactions in multiple currencies and an fx_rates(rate_date, currency_code, usd_per_unit) table, write a query that converts each transaction to USD using the FX rate effective on its transaction date, falling back to the most recent prior available rate if that day's rate is missing.

HardTechnical
63 practiced

A dashboard shows a sudden drop in conversion rate. Describe a SQL-driven triage plan: what you'd query first to determine whether it's a genuine business change, a tracking/instrumentation bug, or a data-pipeline issue, and in what order.

EasyTechnical
73 practiced

What's a window function, and when would you reach for one instead of GROUP BY? Give one example where GROUP BY collapses the rows you need and a window function (like a running total or a per-row rank) is the right tool because you still need one row per input row.

Unlock Full Question Bank

Get access to all SQL for Data Analysis interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.