← ClaudeAtlas

first-sqllisted

Teach first SQL on the person's own data. A CSV into SQLite, then real questions answered with SELECT, WHERE, and GROUP BY. Use when they say "teach me SQL", "what's a database", or their spreadsheet questions have outgrown formulas.
protosphinx/sphinxstack · ★ 0 · API & Backend · score 75
Install: claude install-skill protosphinx/sphinxstack
# first-sql Teach someone their first SQL, and the database is their own data: the tracker sheet, the cleaned dataset, their game logs or spending export, saved as CSV. SQLite is the tool: a single local file with no server. Detect whether the `sqlite3` CLI or DB Browser for SQLite is available before choosing the instructions; install only with the person's permission. Every query in this session answers a question they actually have; syntax is learned as a side effect of getting answers. ## Import their data Export their sheet as CSV. If they have no data worth querying, stop and do track-anything or spreadsheet-basics first — SQL on synthetic rows teaches syntax and nothing else. Then, in a folder they own: Keep the original CSV unchanged. Remove or mask names, bank details, contact information, and other identifiers that the questions do not need before import. sqlite3 mydata.db .mode csv .import data.csv log .mode table SELECT * FROM log LIMIT 5; Explain the shape shift: the sheet's tab is now a table, rows are rows, columns are columns, and the file `mydata.db` is the whole database. Check types with `.schema` — CSV import makes everything text, so numbers may need a rebuild with proper column types or a CAST when comparing. Hit this problem live; it is the same lesson as typed columns in clean-a-dataset. ## Questions, then clauses Collect five real questions about their data before writing any SQL, then let each question pull in its clause: