FDEInterviews logo
Practice tests · 37 questions

SQL & Data Engineering: the practice test

Window functions, gaps-and-islands, Spark internals, lakehouse design, idempotent pipelines and CDC: the Databricks/Snowflake/Palantir data track. This test drills exactly that: 12 easy, 10 medium and 15 hard questions, every one explained, every explanation linking into the worked material.

Set up your test
Topic
How confident are you feeling?
Questions
12 in this pool · about 7 min
Reveal answers
Sign in to startFree account · your questions rotate between takes

Sample questions, answered

easy · sample
Three salespeople tie for the second-best revenue. You need 'top 3 per region' to return exactly three rows per region, ties broken deterministically. Which window function?
RANK, which gives tied rows the same number and skips ahead after them
DENSE_RANK, which gives tied rows the same number without skipping
ROW_NUMBER, with tiebreaker columns added to the ORDER BY so the numbering is stable
NTILE(3), which splits each region's rows into three buckets

ROW_NUMBER is the only one of these that guarantees unique sequential numbers, so 'keep rows numbered 1 to 3' returns exactly three. RANK would return four rows when two tie for second, DENSE_RANK can return even more, and NTILE answers a different question entirely. The deterministic part matters in production: without a full tiebreaker in the ORDER BY, ROW_NUMBER can order tied rows differently on each run, and your 'top 3' quietly changes between refreshes. Interviewers use this trio to check you know what happens on ties, because real data always has them.

easy · sample
Designing a star schema for a ride-sharing company, which statement gets the fact/dimension split right?
Facts and dimensions are distinguished mainly by row count, with the larger tables being facts
Trips are dimensions because each one describes an event in full detail
Facts hold measurable events at a declared grain; dimensions hold the descriptive context
Dimensions hold anything that changes over time; facts hold static reference data

The fact table records events you measure, one row per event at a stated grain ('one row per completed trip'), carrying numeric measures and foreign keys. Dimensions answer who, what, where and when, and are joined in for slicing. Declaring the grain out loud is what separates practitioners: half of all star-schema bugs are grain confusion, like mixing trip-level and payment-level rows in one fact. Facts do tend to be huge and dimensions small, but that is a consequence of the definition, not the definition, and interviewers notice which one you lead with.

Go deeper than the quiz

A practice test measures recall. The material it draws from teaches the reasoning: