💻 Code with AI: Write and Understand SQL Easily

This week, let AI help you write clean database queries and explain them step by step, even if you are totally new to SQL!

I have a database table called [table_name] with these columns: [list columns, e.g., id, name, country, score].
Write a [database type, e.g., MySQL / PostgreSQL / SQLite] query to [explain what you want to find or calculate].
Then, explain how each line works in simple words.

Example:
Ask for the top three students from Kenya by test score:

SELECT name, score
FROM students
WHERE country = 'Kenya'
ORDER BY score DESC
LIMIT 3;

Pro tip: Mention sample data values in your prompt so the AI picks the best data types and filters.

Always test AI-generated queries on dummy data first, and never paste real passwords, API keys, or private user data into an AI tool.

Give this prompt a try and reply below with what you built or fixed!

Cheering you on,
Sydney :laptop::paw_prints: