Data & Machine Learning

SQL & Analytics

6 practice questions. Free questions open a full answer guide; the rest unlock with Pro.

  • When would you reach for a SQL window function instead of GROUP BY, and how do ROW_NUMBER, RANK, and DENSE_RANK differ? Mid level
  • What is the difference between a GROUP BY aggregation and a window function in SQL? Give an example where you'd reach for a window function.Go Pro Junior level
  • A teammate wrote a deduplication query using GROUP BY with a long list of aggregates to collapse duplicate event rows. Walk me through when you'd reach for a window function like ROW_NUMBER() instead, and the trade-offs.Go Pro Senior level
  • An analytics query that joins a large fact table to a dimension has suddenly gotten 10x slower, and the profiler shows one task running far longer than the rest. How do you diagnose and fix it?Go Pro Senior level
  • Describe what a SQL JOIN does. What is the difference between INNER JOIN and LEFT JOIN?Go Pro Junior level
  • Given a table that may contain duplicate rows, how would you find the duplicates and keep only one row per key in SQL?Go Pro Mid level
Want questions matched to your role? Paste a job title, job description, or CV for a personalized set, or go Pro to unlock the full bank.