pbPassingBI
/

SQL interview questions

10 questions with answers, grouped by topic.

Query basics

SELECT, WHERE, ORDER BY and how a query is actually executed.

1

Joins & sets

Combining tables without silently changing your row count.

3

Aggregation

GROUP BY, HAVING, and the mistakes that produce wrong totals.

2

Window functions

Ranking, running totals and period-over-period.

2

Structure & performance

Subqueries, CTEs, indexes and reading a plan.

2