# Analytics SQL from a question (/data--analytics-sql)

/data--analytics-sql is a Claude Code skill in the Data section. Turns a plain-language business question into a runnable analytical SQL query built on your project's real schema, with an explanation.

- Web version: https://skills.sgomez.dev/en/s/data--analytics-sql
- Section: [Data](https://skills.sgomez.dev/en/data.md)
- Author: Santiago Gómez de la Torre
- License: MIT
- Source: https://github.com/sgomez-dev/claude-skills/blob/main/skills/data/analytics-sql.md
- Updated 10 Jul 2026

## How to ask for it

- `/data--analytics-sql how many new users did we get each month this year`
- `/data--analytics-sql give me the SQL to calculate average revenue per customer`
- `/data--analytics-sql which products sell best in each region, as SQL`

## Install

macOS · Linux:

```
curl -fsSL https://raw.githubusercontent.com/sgomez-dev/claude-skills/main/install.sh | bash
```

Windows:

```
irm https://raw.githubusercontent.com/sgomez-dev/claude-skills/main/install.ps1 | iex
```

Claude Code plugin:

```
/plugin marketplace add sgomez-dev/claude-skills
/plugin install data-skills@claude-skills-collection
```

## Permissions

- Reads: `**/*.sql`, `**/migrations/**`, `**/models/**`, `**/*.yml`, `**/schema*`, `**/*.prisma`, `**/*.py`
- Writes: `analytics_*.sql`, `queries/*.sql`
- Runs: —
- Network: No
- Destructive: No

## Author's description

Turn a plain-language question into optimized analytical SQL for your schema

- [How we review this](https://skills.sgomez.dev/en/methodology.md)
