SQL Typing Test
Type real SQL queries: SELECT lists, joins, grouping and window functions.
Loading coding passages...
SQL is the least symbol-heavy language on this site and the most case-sensitive to type. Keywords are written in capitals, names in lower case, and the switch between them happens several times a line. This test serves real queries and checks every letter’s case.
What you will actually be typing
Two excerpts from the 10 SQL passages in this test, shown exactly as you type them. Press Enter at the end of each line and the next line’s indentation is filled in for you. Each passage runs to several thousand characters, more than anyone types in five minutes.
SELECT id, owner, status, completion, score
FROM user_profiles
WHERE status = 'verified'
ORDER BY score DESC;
-- Profile Audit owner totals 1
SELECT owner, SUM(score) AS total_score
FROM user_profiles
GROUP BY owner;
-- Profile Audit metric warning 2
SELECT id, owner, completion
FROM user_profiles
WHERE completion < 10;
-- Profile Audit ranked sample 3UPDATE account_subscriptions
SET reviewed_at = CURRENT_TIMESTAMP
WHERE status = 'paused'
AND seats >= 10
RETURNING id, account, reviewed_at;
-- Subscription Plan owner totals 5
SELECT account, SUM(monthly_fee) AS total_monthly_fee
FROM account_subscriptions
GROUP BY account;
-- Subscription Plan metric warning 6Who this test is for
Data analysts, backend developers and database administrators who write queries all day, and students learning SQL who want the syntax to stop interrupting their thinking.
Because SQL has few symbols, it is also a good first coding test for anyone coming from ordinary typing: the challenge is case and structure, not punctuation.
| Durations | 1, 2, 3 or 5 minutes |
|---|---|
| Passages | 10 SQL passages, 45,612 characters in all; choose one before you start |
| Difficulty | One level: every passage is real working code, not graded drills |
| What counts | Every character and line break must match the passage. Enter fills in the next line’s indentation; Tab inserts two spaces |
| Speed | Gross WPM = characters typed ÷ 5 ÷ minutes. Net WPM takes one word off per error |
| Accuracy | Overall accuracy, plus symbol accuracy: the share of brackets, quotes and operators typed correctly |
| Report card | Separate counts for symbol, bracket, quote, semicolon, whitespace and new-line mistakes |
The SQL symbol profile
Across 10 passages and 45,612 characters, SQL averages just 6.5 symbols per 100 characters, less than half of JavaScript or HTML. Indentation is almost absent at 0.1% of characters, because each clause starts on its own line at the left margin.
Names average 6.3 characters, mostly snake_case column and table names such as user_profiles and created_at, so the underscore is the other key to have under control.
| Symbol | Per 100 characters |
|---|---|
| - hyphen | 1.5 |
| , comma | 1.4 |
| ( parenthesis | 1 |
| ) parenthesis | 1 |
| ; semicolon | 0.8 |
| ' single quote | 0.4 |
| * asterisk | 0.2 |
| < angle | 0.2 |
The symbol runs you will type most
-- leads because most queries in these passages are introduced by a comment. The rest are short: ', and '); at the end of quoted values, (*) in COUNT(*), and () after RANK.
| Run | Per 1,000 characters |
|---|---|
-- | 7.5 |
', | 2.1 |
(' | 2 |
(*) | 1.9 |
() | 1.9 |
'); | 0 |
How SQL compares with the other coding tests
| Measure | HTML & CSS | Java | JavaScript | Python | SQL | TypeScript |
|---|---|---|---|---|---|---|
| Symbols per 100 characters | 17.2 | 13.7 | 16.9 | 14.3 | 6.5 | 16.1 |
| Indentation, share of characters | 2.6% | 3.3% | 3% | 8.2% | 0.1% | 1.6% |
| Capital letters, share of characters | 2% | 4.4% | 2.4% | 0.5% | 22% | 4% |
| Average name length | 5.5 chars | 6.9 chars | 6.2 chars | 5.8 chars | 6.3 chars | 6.5 chars |
| Average line length | 37 chars | 39.1 chars | 36.6 chars | 40.3 chars | 32.6 chars | 53.4 chars |
Typing SQL: case, commas and comments
The defining skill is case switching. 22% of every character in these passages is a capital, by far the most on the site, and 39% of words are all-capital keywords. SQL itself does not care: in PostgreSQL, as in standard SQL, keywords and unquoted names are case-insensitive. But writing keywords in capitals and names in lower case is the widespread convention, the passages follow it, and the test checks it.
For runs of capitals, use Caps Lock rather than holding Shift: SELECT, GROUP BY and ORDER BY are full words in capitals, which is exactly what Caps Lock is for. The skill is turning it off again before the column name. Typists who use Shift for every capital usually lose more time than they would to two Caps Lock presses.
Commas carry the structure. SELECT lists separate columns with commas, and a missing or doubled comma breaks the query. Type each column and its comma as one unit, and watch aliases introduced with AS.
The hyphen is the most frequent symbol here, because comments in SQL start with two of them (--). Semicolons end statements and appear in 26.3% of lines.
Anatomy of one line
A window-function query line: seven words in capitals and four lower-case names, including the snake_case alias score_rank, with a parenthesised ORDER BY in the middle. Count the times the case changes.
SELECT id, owner, RANK() OVER (ORDER BY score DESC) AS score_rank| Characters | 65 |
|---|---|
| Letters | 48 |
| Symbols | 6 |
| Spaces | 10 |
| Keys that need Shift | 32 |
Reading your SQL report card
SQL runs usually have few symbol errors, so read overall accuracy first. Most SQL mistakes are letters typed in the wrong case: a keyword in lower case or a column name in capitals. The test counts each one as an ordinary error.
Next look at quote and new-line errors. Quoted values in WHERE clauses are the main source of quote errors, and each clause on its own line means a mistimed Enter shows up as a new-line error. Bracket errors should be rare, coming only from function calls such as COUNT(*) and window clauses.
Mistakes the report card will show most
- A lower-case keyword, or a capitalised column name, after a Caps Lock or Shift slip.
- A missing comma between columns in a SELECT list.
- One hyphen instead of two at the start of a comment.
- Leaving Caps Lock on into a snake_case name.
The habits that apply to every kind of typing, such as accuracy before speed and short daily practice, are in how to type faster. For symbols on their own, use the symbol typing test.
A three-step practice plan
The aims below are our suggestions, not pass marks. The test itself has no pass mark; it reports your speed and accuracy and lets you judge the trend.
| Step | Run | Aim for |
|---|---|---|
| Warm up | 1 minute on the alpha-numeric typing test | Switching case mid-line without pauses |
| Build | 2-minute SQL runs, rotating passages | Every keyword in capitals, every name in lower case |
| Stretch | 5-minute SQL runs | Accuracy of 97% or more, which is reachable with so few symbols |
Frequently asked questions
Are SQL keywords case-sensitive in this test?
Yes, in the test. SQL itself treats keywords and unquoted names as case-insensitive, but the passages follow the common convention of capital keywords and lower-case names, and the test compares every character, so case counts.
Should I use Caps Lock or Shift for SQL keywords?
Caps Lock for whole keywords such as SELECT and GROUP BY; Shift for a single capital. The important habit is switching Caps Lock off before the next lower-case name.
What kinds of queries are included?
10 passages with filters, aggregates with GROUP BY, ranking with window functions, date truncation and comments. Each passage is a series of short queries on one table, the way a report is often built up.
Is SQL easier to type than other languages?
For symbols, yes: 6.5 per 100 characters against 15–17 for most other languages here. For case, no. Most SQL errors in the report card are capitals in the wrong place.
Which SQL dialect do the passages use?
Mostly standard SQL that runs on PostgreSQL and most other databases, with a few PostgreSQL functions such as DATE_TRUNC and RETURNING.
Do the queries need to be correct to type them?
No. The test compares your typing with the passage; it does not run the queries. They are written to be realistic, but the point is the typing.
Why are there so many comment lines?
Because real analysis queries are often labelled, and because a comment starting with -- is a good warm-up for the hyphen and the space after it. They also make each passage read as a series of separate, named queries.
Other coding typing tests
Sources
Conventions cited on this page come from the sources below. Every figure about the passages is measured from the passages themselves, and recalculated each time the site is built.
- PostgreSQL documentation — SQL syntax: lexical structure (identifiers and key words)PostgreSQL Global Development Group · link checked 20 Oct 2026