SQL Query Writer Prompt
Describe your tables and the question, and get a correct, readable SQL query. Fill in the blanks and the prompt writes itself, ready to copy into ChatGPT, Claude, Gemini, or Copilot. Nothing you type is sent to our server.
Fill in the blanks
Your prompt
342 characters · ≈ 86 tokens
Write a PostgreSQL query for this question: [What you want to know] Schema: ``` [Tables and columns] ``` Use only the tables and columns above. If the question is ambiguous (for example which order statuses count), state your assumption. Format the query for readability, then explain briefly how it works and which index would speed it up.
Still to fill in:
This prompt is too long to open by link. Copy it and paste it into the chat instead.
Could not save: your browser is blocking storage for this site.
Share links keep your answers after the # in the address, which browsers never send to a server. Saved prompts stay in this browser only.
Your saved prompts
Example: SQL Query Writer Prompt filled in
Write a PostgreSQL query for this question: The 10 customers who spent the most in the last 30 days, with their total and order count. Schema: ``` customers(id, name, email) orders(id, customer_id, total, status, created_at) ``` Use only the tables and columns above. If the question is ambiguous (for example which order statuses count), state your assumption. Format the query for readability, then explain briefly how it works and which index would speed it up.
Tips for better results
- Run new queries on a copy of the data, or add LIMIT, before running them on production.
- Check facts, names, and numbers in the answer. AI models can sound sure and still be wrong.
- Not quite right? Reply with what to change ("shorter", "less formal") instead of starting over.
More coding prompts
Prompt library
26 fill-in-the-blank templates. Each has its own page you can bookmark.
About the AI Prompt Builder & Library
Most weak AI answers come from vague prompts. A good prompt says who the AI should act as, what to do, the background it needs, who the answer is for, and what the result should look like. This builder puts those parts in a simple form, and the library has ready-made templates for common jobs, each written to stop the AI from inventing facts. Copy the finished prompt, open it straight in ChatGPT or Claude, share it as a link, or save it in your browser.
How to use it
- 1 Pick a template from the library, or use the builder for anything else.
- 2 Fill in the blanks. The prompt updates as you type, and anything required but empty shows in [brackets].
- 3 Copy the prompt, or open it in ChatGPT or Claude. Save it or copy a share link to use it again.
Frequently asked questions
What makes a good AI prompt?
Be specific about five things: the role (who the AI should be), the task (start with a verb), the context (background and goal), the audience, and the output (format, length, and tone). Add rules for what to avoid, and an example if you have one. Asking the model to say when it is not sure also cuts down on made-up answers.
Do these prompts work with Claude, Gemini, and Copilot?
Yes. The prompts are plain text, so they work in ChatGPT, Claude, Gemini, Microsoft Copilot, Perplexity, DeepSeek, and local models. The "Open in" buttons fill the prompt in for you on ChatGPT and Claude; for the others, copy and paste it.
Why does my prompt show text in [brackets]?
Brackets mark a required blank you have not filled in yet, such as [Topic]. Fill it in, or replace it in the chat before sending, so the AI does not guess.
Is what I type saved or sent anywhere?
No. The prompt is built in your browser. Share links keep your answers after the # in the address, a part browsers never send to a server, and saved prompts are stored only in this browser. Opening a prompt in ChatGPT or Claude sends it to that service, as pasting would.
Should I put private information in a prompt?
Be careful. Remove passwords, API keys, account numbers, and other people's personal details before you paste anything into an AI chat, and check your chat app's settings for whether conversations are used for training.
How long should a prompt be?
As long as it needs to be clear. A few precise sentences beat a long, vague one, but pasting the full document, error, or job posting you are asking about usually helps a lot. The token estimate shows roughly how much of the model's limit the prompt uses.
Related tools
AI Output Cleaner
Clean ChatGPT and Claude text for Word, email, and WhatsApp
AI Token & Cost Calculator
Count tokens and compare GPT, Claude, and Gemini API costs
JSON Repair & LLM Output Validator
Fix broken JSON from ChatGPT, Claude, or Gemini and check it against a schema
AI Crawler Checker
See which AI crawlers, such as GPTBot and ClaudeBot, your robots.txt allows
llms.txt Generator
Create an llms.txt file that guides AI tools to your best pages
Speech to Text & Subtitle Maker
Transcribe audio and video to text and SRT subtitles in your browser