Petit test
Guess first, no penalty. You ask an AI: "Write SQL for revenue by country." What will it have to guess?
A prompt is the message you send to the AI. A schema is the list of your tables and their columns. Without them, the AI invents plausible names and picks its own definitions.
A SQL prompt you can check has four parts:
- Tables: names, key columns and how they join.
- Definitions: what "revenue" or "active customer" means at your company.
- Rules: the date range, the time zone, and what to leave out, like refunds or test accounts.
- Return: the query, every assumption it made, and a second query that counts the rows.
The assumptions list is the part you'll use most. It shows you exactly where the model guessed.
A worked example
Write a PostgreSQL query for monthly revenue by country.
Tables: orders(order_id, customer_id, amount_usd, status, created_at),
customers(customer_id, country). Join on customer_id.
Definitions: revenue = sum of amount_usd where status = 'paid'.
Rules: created_at is in UTC. Use 1 Jan to 30 Sep 2026.
Leave out customers whose email ends in @test.example.
Return: the query, a list of every assumption you made, and a query
that counts the orders included so I can check the result.
Complétez les trous
Fill the gaps.
Prompt
Tables: . Definitions: revenue = . Return: the query and .
Your turn:
Write a [dialect] query for [question].
Tables: [names, key columns, how they join]
Definitions: [metric] = [exact rule]
Rules: [date range], [time zone], [what to leave out]
Return: the query, every assumption, and a row-count query.
Try it
Vos étapes, environ 2 minutes
- 1.Write the prompt for one question you answer every month, run it, and mark any assumption you'd change. Add "read the assumptions list" to your checklist.2 min