Typing for data analysts who write SQL and Python
Data analysts spend a lot of the day writing short pieces of code. You write a query, look at the result, change it and run it again. Then you load the result into Python, clean it and make a chart. Each piece of code is short, but you type it many times. A small typing mistake can make the code fail, or worse, give you a wrong number that looks right.
Touch typing means typing with all ten fingers without looking at the keys. For analysts, it means your eyes can stay on the query and the data while your hands do the typing.
Typing SQL queries
SQL is the language used to ask questions of a database. A typical query looks like this.
SELECT region, COUNT(*) AS orders, SUM(amount) AS revenue
FROM sales
WHERE order_date >= '2026-01-01'
AND status = 'paid'
GROUP BY region
ORDER BY revenue DESC;
Many people write keywords like SELECT, FROM and GROUP BY in capitals. SQL does not care about the case of keywords, so small letters work too. If you use Caps Lock for capitals, remember to turn it off before you type table names and values.
Now look at the symbols. The commas between column names are typed by the right middle finger. The round brackets in COUNT(*) and SUM(amount) are Shift + 9 and Shift + 0, and the * is Shift + 8. The single quotes around text and dates belong to the right little finger, on the key next to ;. The >= sign is Shift + full stop followed by =. The ; at the end is the home key of the right little finger.
A common mistake in SQL is a missing comma between two columns, or an extra comma just before FROM. When you watch the screen while you type, you see these at once. When you look at the keys, you only find out when the database gives you an error.
Typing Python for data work
Python is a programming language that many analysts use with pandas, a library for working with tables of data.
import pandas as pd
df = pd.read_csv("sales.csv")
monthly_total = df.groupby("month")["amount"].sum()
for month, total in monthly_total.items():
if total > 10000:
print(f"{month}: {total:,.0f}")
Every for, if and def line ends with a colon. The colon is Shift + ;, so the left little finger holds Shift and the right little finger stays on its home key.
Python uses spaces at the start of a line to show which lines belong together. This is called indentation. Most editors add four spaces for you when you press Enter after a colon. If you need to add them yourself, Tab is close to the left little finger.
Names like monthly_total, order_date and read_csv use the underscore, which is Shift + -. The right little finger reaches up to - while the left little finger holds Shift. Analysts type underscores all day, so this one is worth practising on its own.
You also type square brackets often, as in df["amount"], to pick a column. The [ and ] keys are to the right of P, and the right little finger types them too.
Typing numbers for data
Data work means typing numbers in filters, dates, limits and test values. You can type them in two places.
The number row is the row above the letters. Each number belongs to a finger. The left hand types 1 to 5, with 1 on the little finger, 2 on the ring finger, 3 on the middle finger, and 4 and 5 on the index finger. The right hand types 6 to 0, with 6 and 7 on the index finger, 8 on the middle finger, 9 on the ring finger and 0 on the little finger. Each finger reaches up and comes straight back to the home row.
The number pad is the block of keys on the right of a full-size keyboard. It is quicker for long columns of figures, like a list of values you enter by hand. Your right hand rests with the index finger on 4, the middle finger on 5 and the ring finger on 6. Many laptops do not have a number pad, so learn the number row too.
In code, the number row is usually the better choice. Numbers come mixed with letters and symbols, like '2026-01-01' or total > 10000. Moving your hand to the number pad and back for one number takes longer than typing it on the row.
Practise with your own queries
General typing practice helps, but you get the most from practising the things you type at work.
- Retype a query you wrote last week without looking at the keyboard.
- Practise dates in the format your database uses, like
2026-01-01, until the hyphens and zeros feel easy. - Type a few lines of column names with underscores, like
customer_id, order_date, unit_price. - Check your work for mistakes before you check your speed.
Be patient with the symbols. Typing ["amount"] without looking feels slow at first, even for people who type letters quickly. That slow stage is normal, and it passes with practice.
For more on symbols, read touch typing for programmers and how to type numbers and symbols without looking.
Typran's Advanced level has lessons for numbers, including a "reach and return" lesson for numbers, where each finger goes out to a number key and straight back home. The Expert level adds symbols like ( ) - + = / and *. You can try the first lesson of each level in the free sample lessons.