Task prompt · Data
Convert a spreadsheet into a SQL table schema
by Agent Yard TeamGet CREATE TABLE statements with types, keys and constraints from a sample file.
Use cases
- Get CREATE TABLE statements with types, keys and constraints from a sample file.
- When you already have a file and want the AI to work from it instead of starting from scratch.
- Reuse it as often as you like: fill in the blanks (common queries) with new details and copy again.
- With ChatGPT, Claude, Gemini and more, the AIs that support what this prompt needs.
Featured in: Best ChatGPT prompts for SQL and databases, Best AI prompts for spreadsheets and formulas.
How to use it
- Open chatgpt.com or claude.ai (or another AI listed here).
- Attach the file (PDF, Word, CSV or Excel), or paste its text into the prompt.
- Fill in the highlighted blank ([COMMON QUERIES]) below, or edit them after pasting.
- Copy the prompt, paste it into the chat and send.
Fill in the blanks (optional)
Prompt
Look at the attached spreadsheet and write a SQL schema for [DATABASE: PostgreSQL / MySQL / SQLite]. - One CREATE TABLE statement (or more if the data should be split into related tables; explain why). - Sensible column names in snake_case, the right types, NOT NULL where the data is always present, and a primary key. - Indexes worth adding for [COMMON QUERIES]. - An INSERT example using the first 3 rows. Note any columns where the type is a judgment call.
One email a week
The Weekly is presented byyour brandSponsored · openThe best new prompts and personas, nothing else.