~/devtype

SQL Query Typing Speed Test

SQL alternates between SHOUTED keywords and lowercase identifiers, a Shift-key workout unlike any programming language. These drills use real analytical queries — joins, aggregations, CTEs, and window functions — not toy SELECT statements.

LV 1
Level 0 / 100 XP
Best 0 WPM
main.js
00 wpm
00%
0s
1
Just start typing or click the code
Esc restart Enter new line, indentation is skipped for you

The Uppercase-Lowercase Alternation Problem

Conventional SQL style capitalizes keywords (`SELECT`, `FROM`, `LEFT JOIN`, `GROUP BY`), which means holding Shift for entire words, releasing for table and column names, then re-engaging — a caps rhythm that trips up typists trained on prose or camelCase code. Multi-word keywords like `ORDER BY` and `PARTITION BY` extend these caps bursts across spaces.

Beyond capitalization, SQL leans on characters other languages barely use: single quotes for string literals (`'2026-01-01'`), the period as a table-column separator (`u.email`), and comparison operators in WHERE clauses. Window functions nest parentheses inside `OVER (...)` clauses, and aliases with `AS` chain the pattern further. Practicing full queries builds the keyword-identifier switching that fragments beginners' speed.

Key Drills for SQL Query:

  • Caps-lock is cheating: Learn to hold Shift through whole keywords. Caps-lock toggling breaks flow and causes iNVERTED tYPOS.
  • Dot-notation flow: Drill `alias.column` patterns — the period mid-identifier appears in every join you'll ever write.
  • Quote discipline: SQL uses single quotes where most languages use double. Retrain the reflex or face syntax errors.

Sample Drill: Left Join & Aggregation

Retrieve items and aggregate counts using LEFT JOIN and GROUP BY.

sql-join · easy
SELECT u.id, u.email, COUNT(o.id) as total_orders
FROM users u
LEFT JOIN orders o ON u.id = o.user_id
WHERE o.created_at >= '2026-01-01'
GROUP BY u.id, u.email
ORDER BY total_orders DESC;

All 15 SQL Query Drills

Every session picks a random drill from this pool. Use the difficulty filter above to stay on easy warm-ups or jump straight to the hard ones.

  • Left Join & Aggregation easy

    Retrieve items and aggregate counts using LEFT JOIN and GROUP BY.

  • Filter, Sort & Limit easy

    Select recent active users with WHERE, ORDER BY, and LIMIT.

  • Insert Returning easy

    Insert a row and get its generated id back with RETURNING.

  • Guarded Update easy

    Update an order only if it is still in the expected state.

  • Group By & Having easy

    Find repeat customers by filtering grouped counts with HAVING.

  • Common Table Expression medium

    Query utilizing CTE for cleaner database reads.

  • Upsert on Conflict medium

    Increment a daily counter or insert it with ON CONFLICT.

  • Aggregate FILTER & CASE medium

    Compute churn rates per plan with FILTER and a CASE segment.

  • Create Table & Index medium

    A comments table with foreign keys, a check, and an index.

  • Anti-Join with NOT EXISTS medium

    Find users with no orders in the last 90 days.

  • Window Function Ranking hard

    Ranking rows per partition with ROW_NUMBER over a window.

  • Running Total & Moving Avg hard

    Window frames for a cumulative sum and a 7-day moving average.

  • Recursive Org Chart hard

    Walk a manager hierarchy with a recursive CTE and depth.

  • Month-over-Month Growth hard

    Compare each month's revenue to the previous one with LAG.

  • Delete Duplicate Rows hard

    Keep the oldest user per email and delete the duplicates.

The Symbols That Slow You Down

The keystrokes below are where SQL Query typing speed is won or lost. Key positions shown for QWERTY — the pattern transfers to any layout, just on different physical keys.

Symbol Used For Keys How to Drill It
'...' String literal Apostrophe, unshifted (right of semicolon) SQL uses single quotes where you're used to doubles. The apostrophe should open and close literals reflexively.
* Select all / count Shift+8 `SELECT *`, `COUNT(*)` — one of the first characters of most queries. Shift-8 at line starts must be instant.
-- Comment Two hyphens, unshifted Line comments in every dialect. Two even hyphen strikes without a pause between.
% LIKE wildcard Shift+5 `LIKE '%dev%'` — the wildcard arrives in pairs around patterns. A top-row reach worth drilling.
!= Not equal ! as Shift+1, then = unshifted (or <> as Shift+Comma, Shift+Period) Two spellings of the same operator exist; know which your dialect prefers and type it automatically.
. Qualified name Unshifted period `u.email`, `orders.total` — the alias.column rhythm repeats through every join. Period mid-word must flow.

Common SQL Query Typing Mistakes

  • ✗ Caps-lock toggling for keywords — it breaks rhythm and causes mIxeD-case typos. Hold Shift through whole words.
  • ✗ Using double quotes out of habit for strings — in standard SQL those are identifiers, and the typo survives until runtime.
  • ✗ Missing the alias dot in joined columns: train the period between two lowercase words as one motion.

What's a Good SQL Query Typing Speed?

Keyword capitalization makes SQL a Shift-endurance sport: 30–45 WPM is solid working speed, and 50+ WPM with 96%+ accuracy is excellent. Long analytical queries with several joins are the best self-test.