SQL Typing Practice

Master SQL syntax with real-world code examples. Practice typing SQL code to boost your development speed and reduce syntax errors.

Start SQL Practice

Why Practice SQL Typing?

SELECT Queries

Master SELECT statements with WHERE, ORDER BY, and LIMIT clauses.

JOINs

Practice INNER JOIN, LEFT JOIN, and complex multi-table queries.

Aggregations

Get comfortable with GROUP BY, HAVING, and aggregate functions.

Subqueries and CTEs

Smoothly type nested queries and WITH clauses.

Common SQL Syntax

Practice these common SQL syntax patterns for smooth coding:

  • SELECT * FROM users WHERE
  • LEFT JOIN orders ON
  • GROUP BY category HAVING
  • WITH cte AS (SELECT...)

Why practice typing SQL code?

SQL looks short and simple, but typing it fluently is its own skill. Queries are full of uppercase keywords, comma-separated column lists, single-quoted string literals, snake_case names with underscores, and parentheses for functions and subqueries. Almost every one of those needs Shift, and a single missing comma or quote turns a correct query into a syntax error.

Developers type SQL in places where autocompletion is limited or absent: a database console, a migration file, a BI tool, a quick query during an incident. Being able to write SELECT, JOIN and GROUP BY without hesitation means you can explore data at the speed you think, and spend your attention on the logic of the query instead of on the keyboard.

DevType has SQL practice across five levels, from single short statements to longer queries with joins and aggregation. Leading indentation is filled in automatically, so you can concentrate on keywords, symbols and names.

Symbols you type often in SQL

SELECT

Uppercase keywords

Keywords such as SELECT, FROM and WHERE are commonly written in uppercase. Hold Shift with the hand opposite the letter you are typing, for example the right Shift for S and E. Holding Shift and typing the letter with the same hand is slower and puts strain on the pinky.

,

Column and value separator

Column lists, VALUES lists and function arguments are separated by commas, usually followed by a space. The comma has its own key on both US and JIS keyboards. Practice comma plus space as one motion, and watch the last item in a list, which has no comma after it.

*

All columns and COUNT(*)

On a US keyboard the asterisk is Shift+8. On a JIS keyboard it is Shift with the colon key, to the right of the semicolon. In COUNT(*) it sits between parentheses, so the whole sequence is a run of Shift keys.

'

String literal quote

Standard SQL uses single quotes for strings. On a US keyboard the single quote has its own key to the right of the semicolon and needs no Shift. On a JIS keyboard it is Shift+7. Type the opening and closing quote as a pair in your mind so that you never leave a string open.

= / <>

Comparison operators

On a US keyboard = has its own key to the left of Backspace. On a JIS keyboard = is Shift+hyphen. The not-equal operator <> is Shift+comma then Shift+period on both layouts, so keep Shift held for both keys.

_

Underscore in snake_case names

Table and column names like user_id and created_at are full of underscores. On a US keyboard it is Shift+hyphen. On a JIS keyboard it is Shift with the ro key at the bottom right, next to the right Shift, which is a long reach for the right pinky.

( )

Function calls and subqueries

Parentheses appear in COUNT(), IN (...) and subqueries. On a US keyboard they are Shift+9 and Shift+0. On a JIS keyboard they are one key to the left: Shift+8 and Shift+9. If you switch keyboards, this one-key shift is a classic source of mistakes.

JOIN ... ON

Joins and table aliases

A join combines keywords, aliases, dots and an equals sign in one line. Learn it as a fixed shape: JOIN, table, alias, ON, alias dot column, equals, alias dot column. The period has its own key on every layout.

;

Statement terminator

Most queries end with a semicolon. It has its own key on both US and JIS keyboards, under the right pinky. Make it part of the last word of the query so that you don't forget it before pressing Enter.

SQL typing data on DevType

Median speed
21 WPM
Top 10% speed
33 WPM
Average accuracy
91.9%

Most mistyped symbols

  1. 1.*
  2. 2.=
  3. 3.;
  4. 4.-
  5. 5._

Based on SQL plays on DevType as of November 2026. Plays shorter than 5 seconds are excluded. The numbers are updated as more records come in.

Common typing mistakes in SQL

Missing or extra commas in column lists

Forgetting a comma between columns, or adding one after the last column before FROM, is one of the most common SQL slips. In a typing game it costs a correction; in a real database it costs a syntax error. Read the list as pairs: name, comma, space.

SELECT id, name, email
FROM users
ORDER BY created_at DESC;

Wrong or unbalanced quotes

Using double quotes for a string out of habit from other languages, or forgetting the closing quote, are both common. On a JIS keyboard the single quote is Shift+7, which is easy to miss if you are used to a US layout. Check that every opening quote has its partner.

SELECT name FROM users WHERE status = 'active';

Losing the case of keywords

DevType checks exactly the characters you see, so typing select when SELECT is shown is a mistake, even though most databases accept both. Caps Lock only affects letters, but if you use it, remember to turn it off for lowercase names and check how your OS or input method treats that key.

SELECT COUNT(*) FROM orders WHERE total > 100;

Tangling joins and aliases

A join line packs table names, short aliases, dots and an equals sign close together. It is easy to swap aliases or forget ON. Say the shape to yourself as you type it and keep your eyes one token ahead.

SELECT u.name, o.total
FROM users u
JOIN orders o ON o.user_id = u.id;

Breaking the rhythm on aggregation

GROUP BY and HAVING bring two-word keywords, parentheses and snake_case names together. People often type the underscore late, or drop the closing parenthesis of COUNT(*). Treat GROUP BY as one word and COUNT(*) as one symbol.

SELECT user_id, COUNT(*) AS order_count
FROM orders
GROUP BY user_id
HAVING COUNT(*) > 1;

Tips to type SQL faster

Use the opposite-hand Shift for keywords

Uppercase keywords are where SQL typing is won or lost. Press the left Shift for letters typed by the right hand and the right Shift for letters typed by the left hand. It feels slow for a few sessions and then becomes much faster and more accurate than one-hand Shift.

Learn multi-word keywords as chunks

GROUP BY, ORDER BY, LEFT JOIN, IS NOT NULL and INSERT INTO always appear together. Typing them as single words, including the space, lets your eyes move on to the next part of the query.

Close what you open

Quotes and parentheses always come in pairs. Before you move on from a string or a function call, make sure your fingers have typed the closing character. This habit prevents most of the errors that are hardest to spot.

Match DevType's settings to your keyboard

The positions of ', *, =, _ and parentheses differ between US and JIS. Set your physical layout (ANSI, ISO or JIS) in Settings so the keyboard guide shows the real keys, and turn on the hand guide if you are fixing your finger usage for the underscore or quotes.

Drill your weak symbols with AI

After a session, the AI typing analysis on the result page points out weak keys and fingers. If underscores or quotes show up, ask the AI problem generator for SQL with many snake_case columns or string conditions, or upload real queries from your work as custom problems.

SQL typing practice plan

  1. 1

    Step 1: Get keywords right on Lv 1-2

    Short SELECT statements are ideal for building the Shift habit. Aim for 95% accuracy or higher, with every keyword in the correct case and every statement ending in a semicolon. Press Esc for a new problem and keep going until clean runs feel normal.

  2. 2

    Step 2: Smooth out lists and conditions on Lv 3

    Column lists, WHERE conditions and string literals get longer here. When a problem trips you up, hold Tab and press Enter to retry the same query until you can type it without pausing at commas or quotes.

  3. 3

    Step 3: Build speed on Lv 4-5

    Joins, GROUP BY and nested parentheses appear in longer queries. Turn on the pace caret in Settings and set it a little above your recent WPM. Try to keep up while keeping the accuracy you built in Step 1.

  4. 4

    Step 4: Review and target weak spots

    Use the AI typing analysis and replays to see where you slow down, for example underscores or the shift between keywords and lowercase names. Practice those with AI-generated or custom problems, then go back to Lv 4-5 to measure your progress.

SQL code examples

Each example has a line-by-line explanation and can be practiced right away (practice results are not recorded in the rankings).

SQL typing practice FAQ

Is typing speed important for SQL when queries are short?

Yes. SQL is often written interactively, in consoles and data tools where you write, run and rewrite queries many times. Typing keywords, commas and quotes without hesitation keeps that loop fast, and fewer typos means fewer syntax errors to hunt down.

Do I have to write SQL keywords in uppercase?

Most databases treat keywords as case-insensitive, so uppercase is a convention for readability rather than a rule. In DevType, however, you type exactly what is displayed, so keywords must match the case shown in the problem.

How can I type underscores and parentheses faster on a JIS keyboard?

On JIS, the underscore is Shift with the ro key at the bottom right, and parentheses are Shift+8 and Shift+9. Set the physical layout to JIS in DevType's Settings so the keyboard guide shows these positions, and practice snake_case names until the right pinky reaches the ro key without looking.

Do I need to type the indentation in DevType?

No. Leading whitespace at the start of each line is entered automatically and is not counted in your WPM. Enter for a new line counts as one keystroke, and spaces inside the line are typed as usual.