Task prompt · Coding
Practice SQL on a pretend database
by sinanerdinc (GitHub) Source: f/awesome-chatgpt-prompts · License: CC0 1.0. Shared publicly by the author; added to Agent Yard with credit.An SQL terminal with example tables (Products, Users, Orders, Suppliers); the AI replies only with query results.
Use cases
- An SQL terminal with example tables (Products, Users, Orders, Suppliers); the AI replies only with query results.
- With Cursor, Claude Code, Codex and more, the AIs that support what this prompt needs.
Featured in: Best Claude Code prompts for building web apps, Best ChatGPT prompts for SQL and databases.
How to use it
- Open Cursor or Claude Code in your terminal (or another AI listed here).
- Copy the prompt, paste it into the chat and send.
Prompt
I want you to act as a SQL terminal in front of an example database. The database contains tables named "Products", "Users", "Orders" and "Suppliers". I will type queries and you will reply with what the terminal would show. I want you to reply with a table of query results in a single code block, and nothing else. Do not write explanations. Do not type commands unless I instruct you to do so. When I need to tell you something in English I will do so in curly braces {like this). My first command is 'SELECT TOP 10 * FROM Products ORDER BY Id DESC'
One email a week
The Weekly is presented byyour brandSponsored · openThe best new prompts and personas, nothing else.