Trademarks of their respective owners. KissMySkills is not affiliated with or endorsed by them.
How it works
Ask it something hard.
📎 ai-sql-tutor.txtLOADED ✓
I can do SELECT and WHERE. My joins give me way too many rows and I do not know which ones are wrong.
CLAUDE · WITH THIS SKILLYou get: a short task, list every customer with the total value of their paid orders, including customers who never ordered -> your query uses a LEFT JOIN with WHERE o.status = 'paid' -> the count comes back at 210 customers instead of 900 -> instead of a rewrite, the question, for a customer with no orders at all, what value does o.status hold on that row -> you answer NULL -> then the follow up, does NULL equal 'paid' -> you see the WHERE deleted the very rows the LEFT JOIN kept -> the concept named, a filter on the right table turns a LEFT JOIN into an inner one, and the fix belongs in the ON clause -> a progress block for next time.
Questions before you buy? A person answers, usually the same day: hello@kissmyskills.com
// the file itself
Read it before you buy it.
The first lines of the file your AI will read, exactly as delivered. Nothing rewritten for the page.
Use the name Once the file is loaded, talk to it by name: “Serge, check this page.” That is what the name is for. It also keeps several skills apart in one chat.
// the skill your AI runs on
You are a Socratic SQL tutor who asks the learner to predict a row count before running anything. You have been activated to name the concept behind the gap, whether it is NULL semantics, fan out or filter placement.
KissMySkills.com | Install: paste this whole file into Claude Projects (Project instructions), a custom GPT (Instructions), a Gemini Gem, or your AI's system prompt. Then tell it what you want to learn. You are a Socratic SQL tutor. Your job is to make the learner able to write a query against an unfamiliar schema and defend its row count. You are not a query generator. Tone: plain, calm, specific. Short sentences. One idea per turn. The one rule: you never write the finished query for a task you have set. You can show the same clause on another table, ask a question, or name the concept. You cannot hand over the answer. · The learnable order: SELECT and WHERE, logical execution order, filtering and NULL, aggregates with GROUP BY, INNER JOIN, LEFT JOIN, join fan out, subqueries and CTEs, window functions, then indexes and safe writes. · Logical execution order is the key to the rest: FROM, WHERE, GROUP BY, HAVING, SELECT, ORDER BY, LIMIT. Teach it in lesson two. It explains why a SELECT alias fails in WHERE and why HAVING is not WHERE. · NULL is not a value, it is the absence of one. NULL = NULL is not true. IS NULL is the only test. COUNT(col) skips NULLs, COUNT(*) does not. · The join facts that matter: a filter on the right table in WHERE turns a LEFT JOIN into an inner one, a one to many join inflates every SUM, and the fix for double counting is a CTE that aggregates before joining, not DISTINCT. · Classic errors: = NULL, WHERE where HAVING belongs, a SELECT column missing from GROUP BY, SELECT * in a saved query, dates compared as strings, a cross join from a missing ON, UPDATE or DELETE with no WHERE. · Dialects differ, so ask first: PostgreSQL, MySQL, SQL Server, SQLite, BigQuery. Date functions, concatenation, LIMIT versus TOP and casting all differ. · Beginner versus employable: they predict the row count before running, check totals against a known figure, read a plan with EXPLAIN, and wrap writes in a transaction. · Window functions are what analyst interviews test: ROW_NUMBER, RANK, PARTITION BY, running totals, and deduplicating with ROW_NUMBER over a partition. Never ask for a self rating. Ask which database they use, what they have queried before, and what they need to produce. Then one task on a three table schema you write out: customers, orders, order_items. · Complete beginner: has never written SELECT, or only edits queries someone else saved.
121 lines · .txt · instant download
// what's inside
What's inside this skill
Clause execution order taught first, because it explains most SQL bugs
LEFT JOIN, NULL behaviour and join fan out drilled until they are boring
Wrong row counts turned into questions you diagnose yourself
Dialect checked up front: Postgres, MySQL, SQL Server, SQLite or BigQuery
Analysts who inherited a database, marketers tired of asking someone else for a pull, developers who copy queries without reading them, and anyone facing a SQL screen at interview.
// two ways to get it
Use it inside your AI, or download it once.
Library plan
This skill and 2,500+ others, inside your chat
$9/mocancel anytime, or $59 a year
All 2,500+ skills, prompt packs and agents, loaded the moment you ask
Nothing to download or paste: connect once in Claude, ChatGPT, Claude Code or Cursor
New skills every week and 10 catalog files a month to download
Trademarks of their respective owners. KissMySkills is not affiliated with or endorsed by them.
// ask your assistant
Or let your AI set up this skill for you.
Go to kissmyskills.com/pages/connector and set up the "AI SQL Tutor" skill (handle: ai-sql-tutor) for me
Paste it into Claude, ChatGPT, Claude Code, Cursor or Codex. Your AI walks you through connecting KissMySkills (about 3 minutes, 7-day free trial) and loads the skill. What your AI will read →
What you're actually buying
This AI SQL tutor is for when you can write a SELECT with a WHERE and not much more. Then a join turns 400 orders into 1,200, a LEFT JOIN quietly drops the customers you were looking for, and you cannot say why. This file turns Claude, ChatGPT or Gemini into a tutor that has you write queries and read your own row counts, not someone else's solution.
It places you with one query on a schema you describe, then teaches the thing most courses skip: the order the database actually runs your clauses, FROM then WHERE then GROUP BY then HAVING then SELECT. Half of all SQL confusion dies there. From that base it runs joins, fan out, NULL behaviour, CTEs and window functions. When your result set is the wrong size it does not rewrite the query. It asks how many rows you expected and where the extras came from.
One file, identical in Claude, ChatGPT and Gemini. Paste it into a Project, a custom GPT or a Gem, roughly two minutes, and it is yours for good with pay once, keep forever.
// how to install
Under 2 minutes
Four steps. Any AI chat.
01
Download the file
After checkout, the download link lands in your inbox. Save the .txt file anywhere on your device.
02
Open your AI chat
Any AI chat you already use: Claude, ChatGPT, Gemini, Grok, Copilot or another.
03
Paste the prompt
Open the .txt file, copy the prompt section and paste it into Claude or ChatGPT - or add it to a Project so it is always there.
04
Start working
Your AI is now configured as a specialist. Ask it anything inside its domain.
No technical knowledge required.
With Library there is nothing to download. Connect your AI once, then ask for any skill by name.
How does this SQL tutor work if I do not have a database yet?+
It gives you a small schema in text, three or four tables with a few rows each, and you write queries against it in the chat. If you would rather run them for real it tells you how to set up SQLite or a free Postgres instance in a few minutes. Once you have your own tables, you describe them and it teaches on those instead.
Will it just write the query for me?+
No. It is instructed never to write the finished query for a task it set you. When you are stuck it shows the same clause on a different table, or asks how many rows you expected and where the extras came from. Asking it to explain a query someone else wrote is a separate request and it will walk that line by line.
Which dialect does it teach, and does it cover window functions?+
It asks whether you are on PostgreSQL, MySQL, SQL Server, SQLite or BigQuery before it teaches anything with a date function or a string function, because those differ. Window functions are lesson nine: ROW_NUMBER, RANK, running totals and PARTITION BY, which is what most analyst interviews test.
Ready to give your AI a specialist?
This one and 2,500+ others, inside Claude, ChatGPT, Claude Code, Codex or Cursor. Cancel anytime.