← Practice
SQL for Interviews
Past the first few questions, SQL rounds are mostly about window functions and about knowing why a query is slow. Both are here.
3 questions
- Running total per accountWindow functions. The frame clause is the part people get wrong without noticing.mediumWritten#sql#window-functions20 min
- Find the gapsGaps and islands. Once you have seen the trick it is easy, and the trick is worth knowing.mediumWritten#gaps-and-islands#sql#window-functions20 min
- Why is this query slow?An index exists and is not being used. This question is about whether you read plans or guess.hardWritten#indexing#performance#query-planning30 min