SQL typing practice

Real SQL queries with conventional uppercase keywords. The shift work is the point.

0wpm
100% acc
0:00Time
SELECT u.id, u.email, COUNT(s.id) AS sessions, AVG(s.net_wpm) AS avg_wpm FROM users u JOIN typing_sessions s ON s.user_id = u.id WHERE s.created_at >= DATE('now', '-30 days') GROUP BY u.id, u.email HAVING COUNT(s.id) > 5 ORDER BY avg_wpm DESC LIMIT 20;

Just start typing.Tabrestarts

Left handRight hand

Snippet: Join with aggregation (sql)

SQL is a capitalisation workout

By convention SQL keywords are uppercase, which means a typical query is a continuous exercise in shift discipline. SELECT, FROM, JOIN, WHERE, GROUP BY, HAVING, ORDER BY - each one is several shifted characters in a row.

This is exactly where the same-hand shift habit shows up. Typing SELECT with the left hand holding shift and the left hand typing S and E forces the hand off home position twice in one word.

The other SQL specifics

Parentheses appear constantly in aggregates and function calls, usually nested. Commas separate almost every list. Underscores dominate identifiers.

The single quote is worth its own attention: string literals in SQL use single quotes, and the apostrophe key sits under the right little finger next to the semicolon.

Common questions

Should keywords really be uppercase?

It is a widely followed convention rather than a requirement, and these snippets follow it. Either way, the shift practice transfers to every other language you type.

Keep going