Topic
SQL & Data interview problems
Joins, window functions, aggregation and data cleaning in Python. 239 original problems, each with hidden test cases you can run in the browser.
27 easy200 medium12 hard
Showing 211–239 of 239 results
Tests proficiency in multi-table aggregation, ratio computation, windowed moving averages, and handling edge cases with missing data.
Auto-gradedaggregationjoinswindow-functionsdata-analysisAnalyzes reply patterns in social media data using temporal filtering, joins, and aggregation to compute engagement metrics.
Auto-gradeddata-analysisaggregationfilteringTests the ability to clean a list of messy customer records by deduplicating on a canonical key, resolving field conflicts with explicit priority rules, and returning a sorted, normalized result.
Auto-gradeddata cleaningdeduplicationaggregationTests the ability to implement window-style running totals that accumulate within groups and reset at group boundaries, mimicking SQL's SUM() OVER (PARTITION BY ... ORDER BY ...).
Auto-gradedwindow functionsrunning totalsdata processingFix defects in a CSV processing script, refactor for testability with type hints and input checks, write unit tests, and package with Conda.
Model answerpandasrefactoringtestingdata-validationBuild a PostgreSQL schema for orders, write insert statements, compute revenue aggregates with outer joins, filter recent purchases, and update coupon fields.
Model answersqlschema-designaggregationjoinsTests set operations, pairwise comparison, and tie-breaking logic to identify the pair of collections with maximum item overlap.
Auto-gradedsetssimilarity-metricsdata-manipulationCalculate the percentage of total usage time for each application category across the most recent seven days of user sessions.
Model answersqldata-analysisaggregationjoinsWrite SQL queries to analyze user engagement, including identifying inactive users, calculating monthly aggregates, segmenting by usage frequency, and tracking retention.
Model answersqljoinswindow-functionsaggregationTests the ability to perform group-by aggregation (sum, count, average) over a list of dicts, mimicking SQL GROUP BY with multiple metrics and tie-breaking output order.
Auto-gradedgroup-by aggregationdata cleaninglist of dictsTests group-by aggregation: given a list of transaction dicts, compute total revenue and order count per region per month, returned as a sorted list of summary records.
Auto-gradeddata aggregationdictionariessortingPerform three pandas aggregations: identify each user's highest-value order, calculate mean order value, and generate per-day order statistics.
Model answerpandasaggregationgroupbydata-analysisTests ability to assign sequential positions to records within partitions using sorting and grouping logic.
Auto-gradedwindow-functionssortinggroupingIdentify users who recorded at least one activity exactly seven calendar days after joining.
Auto-gradeddata-analysisdate-manipulationset-operationsBuild a pay calculator that validates delivery records, merges overlapping time windows, and computes driver earnings using configurable rate rules.
Model answerdata-validationtime-intervalsaggregationTests filtering credits by role, deduplicating person-movie pairs, validating object types in a shared ID space, and applying a deterministic tie-breaking policy.
Auto-gradeddata-aggregationfilteringdeduplicationTests your ability to produce a fixed-size ranked list when scores contain ties, using a stable secondary sort key.
Auto-gradedrankingsortingtie-breakingleaderboardTests multi-table aggregation with date-windowed filtering, distinct counting, and host-level qualification across inventory, ratings, and coverage.
Auto-gradedaggregationmulti-tabledate-filteringconditional-logicBuild SQL queries to calculate rolling 7-day caller engagement rates and single-day participation thresholds for geo-filtered active users.
Model answersqlaggregationwindow-functionstimezone-handlingCompute the projected total loss from each policy renewal onward, summing the current period's loss with all subsequent renewal periods.
Model answerwindow-functionsaggregationinsuranceTests 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.
Auto-gradedwindow functionsrunning totalsaggregationdata processingTests 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.
Auto-gradedwindow functionsrunning totalsdata cleaningsimulationTests the ability to join two lists of dicts (orders + products) on a key, aggregate per customer, and return a cleaned, sorted summary.
Auto-gradeddata manipulationjoinsaggregationTests joining two lists of dicts (orders + products) on a key, then aggregating revenue and applying data-cleaning rules.
Auto-gradeddata manipulationjoinsaggregationTests ability to perform group-by aggregation over a list of transaction records, computing per-region monthly totals and counts.
Auto-gradeddata manipulationgroup-byaggregationTests 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.
Auto-gradeddata manipulationaggregationgroup-bydictionariesTests 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.
Auto-gradedwindow functionsrunning totalsdata aggregationpandas-style logicTests ability to clean a list of raw customer record dicts by resolving duplicates, normalizing fields, and returning one canonical record per customer.
Auto-gradeddata cleaningdeduplicationdictionariessortingTests 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.
Auto-gradeddata manipulationjoiningaggregation