SQL Practice

SQL Interview Questions & Practice Guide

The SQL topics that come up most in interviews are window functions (running totals, rankings, moving averages), aggregations with GROUP BY, joins (including anti-joins and self-joins), and NULL handling — NULL comparison semantics trip up more candidates than any join syntax does. Ediky's SQL bank weights window functions heaviest for exactly that reason: they're the topic candidates most often haven't practiced enough.

24
SQL questions in Ediky's bank
In-browser SQL runner, instant results
Bank
Window Functions (7 questions)
Largest topic

SQL topics by real weight in Ediky's bank

  • Window Functions (7) — running totals, rankings with ties, moving averages
  • Aggregations (4) — GROUP BY, HAVING, and the classic "top N per group" problem
  • Set Operations (3) — UNION/INTERSECT/EXCEPT and reconciling two datasets without a full outer join
  • NULL Handling (2) — why AVG and SUM/COUNT disagree, and anti-joins that silently return nothing
  • Joins, CTEs, Subqueries, Pivoting, Indexing & Performance, Date & Time — 1-2 questions each

Real questions from Ediky's SQL bank

Actual question titles, by topic:

  • "Nth Highest Spending Customer (With Ties)" (Window Functions)
  • "Running Balance After Each Transaction" (Window Functions)
  • "Why AVG Disagrees with SUM Over COUNT" (NULL Handling)
  • "The Anti-Join That Silently Returned Nothing" (NULL Handling)
  • "Reconcile Two Price Feeds With No FULL OUTER JOIN" (Set Operations)

Why the questions aren't textbook syntax drills

Ediky's SQL questions are framed as real scenarios (a teammate's confusing result, a query that returns nothing when it shouldn't) rather than "write a query to do X" — closer to how SQL interview questions actually get asked, and closer to on-the-job debugging than syntax memorization.

Practice SQL in the browser

24 questions with an in-browser SQL runner and instant results — no local database setup.

Open SQL Practice