60 seconds

SQL typing test

Real SQL queries with capital keywords, snake_case column names and every bracket and comma. The test above is already set to SQL; start typing to begin.

What does the SQL typing test look like?

Each run shuffles real SQL statements together until there are at least 55 pieces to type. Three of them, exactly as they appear:

SELECT user_id, COUNT(*) AS orders
FROM purchases
GROUP BY user_id
HAVING COUNT(*) > 5;
CREATE INDEX idx_events_created_at
  ON events (created_at DESC)
  WHERE deleted_at IS NULL;
UPDATE accounts
SET balance = balance - 250.00
WHERE id = $1
RETURNING balance;

Typed as tokens: SELECT user_id, COUNT(*) AS orders FROM and so on, one Space between each.

Type a piece, press Space and carry on. A piece only counts when every character is right, capitals included, so select is wrong where the test shows SELECT.

Which keys slow SQL writers down?

SQL is the least symbol-heavy language in the code test: only about one character in nine. What it has instead is capitals. Keywords like SELECT, GROUP BY and PARTITION are upper case, and about half the letters in these queries are capitals. Among the symbols, the underscore of snake_case names leads, then brackets and commas:

SymbolNameShare of symbolsKey (US layout)Finger
_Underscore16%Shift + -Right little
(Opening bracket16%Shift + 9Right ring
)Closing bracket16%Shift + 0Right little
;Semicolon11%;Right little
,Comma7%,Right middle
*Asterisk7%Shift + 8Right middle
'Single quote7%'Right little
=Equals5%=Right little
-Hyphen (minus)4%-Right little
$Dollar4%Shift + 4Left index

Single quotes around strings, $1 placeholders and the :: cast also turn up. They are all short, but each one breaks the rhythm of a keyword run.

How do I type SQL faster?

  • Pick a capitals strategy and stick to it. Shift with the opposite hand for short keywords, Caps Lock for long runs. Switching between the two mid-query is where errors happen.
  • Learn the underscore. Shift plus the hyphen key, right little finger. Names like created_at and user_id have it in the middle.
  • Type COUNT(*) as one shape. Capitals, Shift plus 9, Shift plus 8, Shift plus 0. It is in almost every report query.
  • Do not look for the comma. Column lists are full of commas. Right middle finger, straight down from K.
  • Drill the slips. Click a missed key on your result for a drill built on it.

How is the SQL test scored?

Net words per minute counts correct characters, five to a word, and accuracy counts every key you press. The result shows raw WPM, consistency, your slowest pieces and a heatmap of missed keys, saved in your browser so you can track progress.

Code typing tests in other languages

All 6 languages
Advertisements

Questions people ask

What SQL will I type?

Real one-line statements: a SELECT with GROUP BY and HAVING, a partial index, an UPDATE with RETURNING, a window function with ROW_NUMBER and PARTITION BY, an INSERT with ON CONFLICT, COALESCE with NULLIF and a DELETE with an interval. They are shuffled into each run.

Should I use Caps Lock for SQL keywords?

For a run of capitals like PARTITION BY, Caps Lock can be quicker, but you must remember to switch it off before the next lower case name. Holding Shift with the opposite hand is safer for short keywords. Try both in the test and compare your accuracy.

Why is SQL different from the other code tests?

SQL has far fewer symbols than JavaScript or Shell, but many more capital letters, because keywords are traditionally written in upper case. Underscores in names like user_id are its most common symbol. The challenge is Shift timing rather than symbol reaches.

Does choosing SQL here change my settings?

No. This page opens the code test in SQL for this visit only. Your saved code language stays as it was until you pick another in the options above the test.

Keep going

Typing tests by length: 15 second typing test · 30 second test · 1 minute typing test · 2 minute test · 5 minute typing test · 10 minute test · custom text

In other languages: Spanish typing test · French typing test · German typing test · Portuguese typing test · Italian typing test · Test de mecanografía en español · Teste de digitação em português