KatInterview

practice a little every day — you've got this ♡

SQL Interview Problems

Practice 5969 original coding, SQL, system design, machine learning and behavioral problems across 15 topics. Coding and SQL problems run against hidden test cases right in your browser; every problem has hints and a worked solution, free.

5969
Problems
2211
Auto-graded
15
Topics
273
Added today

Showing 91–100 of 100 results

  • SQL & DataMediumAuto-graded
    Filter Hosts by Property Count, Rating, and Review Recency

    Tests multi-table aggregation with date-windowed filtering, distinct counting, and host-level qualification across inventory, ratings, and coverage.

    SQL & Dataaggregationmulti-tabledate-filteringconditional-logic
  • SQL & DataHardAuto-graded
    Compute Per-Group Running Revenue Share with Reset

    Tests window-style running totals and per-group aggregation by computing a cumulative percentage-of-group-total that resets for each new group, given pre-sorted row data.

    SQL & Datawindow functionsrunning totalsaggregationdata processing
  • SQL & DataHardAuto-graded
    Compute Per-Category Running Revenue with Reset on Loss

    Tests ability to implement window-style running totals that accumulate per category but reset to zero whenever a loss (negative value) would pull the running total below zero.

    SQL & Datawindow functionsrunning totalsdata cleaningsimulation
  • SQL & DataMediumAuto-graded
    Reconcile Orders with Product Catalog via Inner Join

    Tests the ability to join two lists of dicts (orders + products) on a key, aggregate per customer, and return a cleaned, sorted summary.

    SQL & Datadata manipulationjoinsaggregation
  • SQL & DataMediumAuto-graded
    Reconcile Sales Orders with Product Catalog

    Tests joining two lists of dicts (orders + products) on a key, then aggregating revenue and applying data-cleaning rules.

    SQL & Datadata manipulationjoinsaggregation
  • SQL & DataEasyAuto-graded
    Summarize Monthly Sales by Region

    Tests ability to perform group-by aggregation over a list of transaction records, computing per-region monthly totals and counts.

    SQL & Datadata manipulationgroup-byaggregation
  • SQL & DataMediumAuto-graded
    Summarise Monthly Revenue by Region from Transaction Records

    Tests group-by aggregation over a list-of-dict dataset, requiring candidates to compute per-region monthly totals, fill gaps, and apply a tie-break for ranking.

    SQL & Datadata manipulationaggregationgroup-bydictionaries
  • SQL & DataMediumAuto-graded
    Running Department Budget Balance by Month

    Tests the ability to compute a month-over-month running total (cumulative sum) of expenses per department, mimicking a SQL window function with PARTITION BY and ORDER BY.

    SQL & Datawindow functionsrunning totalsdata aggregationpandas-style logic
  • SQL & DataMediumAuto-graded
    Deduplicate and Canonicalize Customer Records

    Tests ability to clean a list of raw customer record dicts by resolving duplicates, normalizing fields, and returning one canonical record per customer.

    SQL & Datadata cleaningdeduplicationdictionariessorting
  • SQL & DataMediumAuto-graded
    Reconcile Employee Project Hours Across Two Tables

    Tests the ability to join two lists of dicts (employees and time-log entries) and compute per-employee aggregated project statistics, mimicking a SQL left join + GROUP BY.

    SQL & Datadata manipulationjoiningaggregation