Pick a focused question that fits your time, stack, and interview goal.
How much time do you have?
Show one-drill sessions you can finish now.
19 results across 1 active filter
Page 1 of 1
Pre-aggregates two one-to-many relationships before joining them to prevent fanout from corrupting financial totals.
Builds several daily business metrics in one grouped query while keeping each metric definition explicit.
Uses an ordered window aggregate to calculate a deterministic running balance per account.
Combines daily aggregation, a calendar table, and a window frame to calculate true seven-calendar-day revenue.
Implements correct half-open interval overlap logic for booking validation.
Uses EXISTS instead of a row-multiplying join when the related table is only a filter.
Groups normalized email values to identify duplicates before adding or repairing a uniqueness rule.
Uses the gaps-and-islands pattern to find consecutive login-day streaks after deduplicating same-day activity.
Solves a many-to-many all-match filter with grouping and a deliberate empty-selection rule.
Uses NOT EXISTS to express an anti-join without null traps or duplicate parent rows.
Uses a recursive CTE to return hierarchy depth and a readable root-to-node path.
Implements descending keyset pagination with a compound cursor and stable ordering.
Converts local-day boundaries to UTC once, preserving correct daylight-saving behavior and index use on stored UTC timestamps.
Uses an actual execution plan, row-flow evidence, runtime measurements, and representative parameters to diagnose a slow query without guessing.
Ranks duplicate import rows, previews the deletion set, and removes older copies with deterministic retention.
Uses a conditional update and transaction to prevent overselling while recording the reservation consistently.
Writes a left-join aggregate that keeps active customers with no paid orders and applies date filters without changing join semantics.
Uses ROW_NUMBER with a deterministic tie-breaker to return the complete latest status row per order.
Aggregates product sales and ranks independently inside each category with a deterministic top-N rule.