SQL Queries skill
Write, speed up or translate SQL for Postgres, Snowflake, BigQuery and Databricks.
Official Anthropicby AnthropicChecked November 8, 2026
Install SQL Queries free
Leave your email and the install steps open right here: one prompt to paste into your AI tool. Works for all 151 skills.
SQL Queries is a reference skill in Anthropic's Data plugin that holds the rules of five warehouses (PostgreSQL, Snowflake, BigQuery, Redshift and Databricks), so the SQL Claude writes fits the database you actually use. There is no command to type: the file leaves it to Claude to load, so say "use the sql-queries skill" when you want its rules applied for sure. It writes the SQL; running it still needs a connection to your database, or you paste the query in yourself.
Who is SQL Queries for?
- Analysts
- Product managers
- Founders who read their own database
What's inside SQL Queries
SQL Queries is a single 428-line SKILL.md, almost all of it syntax tables and ready SQL snippets, with no scripts. It writes the SQL only: running a query still needs a connection to your own database or warehouse.
When it switches on
There is no command to type: the file is marked so only Claude can load it, when you ask for a query, want a slow one sped up, need one converted to another database, or are building rankings, running totals or similar analysis. Naming it in your request makes sure it loads.
What the instructions cover
- Side-by-side syntax for five warehouses: PostgreSQL (including Supabase and Neon), Snowflake, BigQuery, Redshift and Databricks
- Date math, text matching and nested-data syntax per dialect, plus Databricks time travel and merge
- Speed tips per warehouse, such as clustering keys in Snowflake and sort keys in Redshift
- Five ready patterns: window functions, step-by-step CTEs (named sub-queries), cohort retention, signup funnels and removing duplicate rows
- A list of six common errors, from ILIKE missing in BigQuery to division by zero
| File | What it is |
|---|---|
SKILL.md | 428 lines: one reference section per warehouse, five query patterns and a debugging list |
Watch out: For BigQuery the file notes that you pay for the bytes a query scans, so it avoids SELECT * and suggests a dry run to preview the cost of big queries.
How to use SQL Queries: which prompts work?
Write a BigQuery query for 30-day retention by signup month, and tell me roughly how much data it will scan.Use the sql-queries skill to translate this Postgres query to Snowflake: [PASTE QUERY]This query takes [TIME]. Rewrite it with CTEs and explain each change in one line.How do you install SQL Queries?
Skills follow the open Agent Skills standard, so this one is not tied to one company. Pick the AI tool you use. Not sure? The first tab covers most of them in one step. New to this? Our guide on how to install Claude skills walks through it, and Anthropic's plugin guide covers the Claude app.
Install this skill for me so it works in every project: run `npx skills add https://github.com/anthropics/knowledge-work-plugins/tree/main/data/skills/sql-queries -g -y` in my terminal. If Node.js is missing, tell me how to install it first. When it's done, confirm the skill is installed and tell me how to start using it.Or do it yourself:
One command installs the skill: it finds the AI tools on your computer and asks which ones should get it.
npx skills add https://github.com/anthropics/knowledge-work-plugins/tree/main/data/skills/sql-queries -gYou need Node.js installed (free, from nodejs.org). The -g flag makes the skill available in every project.
Unlock the install steps
Free. Leave your email once to open the install steps for all 151 skills, and get the best new skills each month.
How did we check SQL Queries?
On November 8, 2026 we read the skill's only file, its 428-line SKILL.md. The section on what's inside comes from that file. Its license is Apache-2.0. Its files were last changed in March 2026.
Our runs, November 8, 2026: in Claude Code with Claude Opus 5.5 we asked for a Postgres sales report to be translated to BigQuery and to Snowflake. The query used FILTER, ILIKE, date_trunc and a ::numeric cast, which do not all carry over. All four translations were correct when we checked them against Google's and Snowflake's own SQL references, including LOWER() with LIKE for BigQuery, which has no ILIKE, and a dry run to preview the bytes billed. The skill loaded in 0 of 2 plain requests and in 2 of 2 that named it, and the answers were about as good either way, so treat it as a checklist rather than the reason the SQL is right.
New to skills and plugins? Skills and MCP is a lesson in our Claude Code course, which is in early access and open for pre-order.