Database · Intermediate
SQL interview practice
Master SQL interview questions on queries, joins, indexes, optimization, and database design. Practice with an AI interviewer that scores clarity, depth, and answer structure — and tells you exactly what to fix.
SQL questions to practice saying out loud
Reading answers isn’t practice. Use these as your warm-up, then run a scored interview and hear yourself answer them.
What are database indexes and when should you use them?
Indexes speed up data retrieval by creating a lookup structure (B-tree). Use them for columns frequently used in WHERE, JOIN, ORDER BY. Avoid over-indexing as it slows INSERT/UPDATE/DELETE.
Explain the difference between WHERE and HAVING.
WHERE filters rows before grouping (cannot use aggregate functions). HAVING filters groups after GROUP BY (can use aggregate functions like COUNT, SUM, AVG).