Loading questions…
Loading questions…
Three skill-assessment pools — SQL (254 questions), Python (200 questions), and Data & System Design (275 questions). Each quiz attempt draws 20 random questions from the section pool, with options shuffled. Single-choice, multi-select, code, and open-ended formats. SQL and Python code questions run live in your browser (PGlite Postgres + Pyodide). Auto-graded. No sign-up.
A randomized 20-question quiz drawn from a 254-question pool covering joins, aggregation, window functions, CTEs, NULL semantics, set operations, indexing, transactions, and gaps-and-islands. Code questions run in an in-browser PostgreSQL (PGlite).
INNER JOIN — keeps only rows where the predicate matches on both sides. LEFT/RIGHT keep unmatched rows on one side, FULL OUTER keeps unmatched on both, CROSS JOIN is a Cartesian product.
WHERE filters rows before grouping; HAVING filters groups after aggregation. SUM(amount) > 1000 works in HAVING but not in WHERE.
NULL = NULL in standard SQL?NULL (unknown). Any comparison with NULL yields NULL. Use IS NULL / IS NOT NULL for NULL checks.
COUNT(*) differ from COUNT(column_name)?COUNT(*) counts every row in the result set; COUNT(col) counts non-NULL values of that column. Use COUNT(DISTINCT col) for unique non-NULL values.
UNION and UNION ALL?UNION performs a distinct-sort to deduplicate, which can be expensive. UNION ALL concatenates without dedup — prefer it when duplicates are impossible or wanted.
ROW_NUMBER(), RANK(), LEAD(), FIRST_VALUE(), and NTILE() are valid. COUNT_DISTINCT() OVER (…) is not — standard DISTINCT is not allowed inside window aggregates in most engines.
A randomized 20-question quiz drawn from a 200-question pool covering comprehensions, generators, decorators, the data model, mutable defaults, the GIL, async, the stdlib, and the data stack. Code questions run in Pyodide with auto pass/fail tests.
[x*x for x in range(5) if x % 2] evaluate to?[1, 9] — the filter keeps odd x values from range(5) (i.e. 1 and 3), then squares them.
def f(x, acc=[]): acc.append(x); return acc after print(f(1)); print(f(2))?[1] then [1, 2]. The default list is evaluated once at function-definition time and shared across calls — the classic mutable-default gotcha.
Immutable types: tuple of ints, frozenset, str, int. list, dict, set are not hashable.
[x for x in big_iter] vs generator expression (x for x in big_iter)?The list materializes all elements in memory; the generator yields lazily and uses O(1) memory. Use a generator for large or infinite streams.
is compare versus ==?is compares object identity (id(a) == id(b)). == calls __eq__ for value equality. Use is None, never == None.
Two threads from executing Python bytecode in parallel. I/O-bound code still scales with threads (the GIL is released around blocking I/O); CPU-bound code needs multiprocessing or a sub-interpreter.
A randomized 20-question quiz drawn from a 275-question pool covering dimensional modeling, SCDs, fact-table grain, partitioning, CDC, streaming (Kafka / Flink), idempotency, exactly-once, watermarks, and scale tradeoffs.
A fact table — measures at a single grain — surrounded by dimension tables joined to it by foreign keys. Snowflake schemas further normalize the dimensions.
The atomic level of detail represented by one row — e.g. one order line, one impression, one daily snapshot. Defining the grain first is the modeling rule of thumb.
Preserve historical attribute values by closing the old row (valid_to) and inserting a new row with the new attributes — so queries can reconstruct the dimension state at any point in time.
Columnar storage, wide scans, denormalized facts, long-running analytical queries. OLTP optimizes for short, indexed point-lookup transactions.
When a join is on the hot path and a duplicated attribute kills latency; when a column is immutable (point-in-time snapshot); when consumers need a flat shape and you control the write path. Not as a blanket replacement for normalization.
Surrogates are stable when natural identifiers change, smaller and faster to index, and required for SCD2 (one natural key maps to many surrogate rows). Natural keys still live on the dimension as a unique business attribute.