Skip to content
Back to skills

Sql Warehouse Conventions

ASecurity

Write SQL that follows the data warehouse conventions. Use for any SQL query.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 1, 2026
ai-agentssql

Security analysis

A100/100

Scanned December 1, 2026

npx -y skills add danielrispler/skill-truce --skill sql-warehouse-conventions --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sql Warehouse Conventions?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Sql Warehouse Conventions
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/danielrispler-sql-warehouse-conventions/badge)](https://www.skillsdirectory.com/skills/danielrispler-sql-warehouse-conventions)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: sql-warehouse-conventions
description: Write SQL that follows the data warehouse conventions. Use for any SQL query.
---

# sql-warehouse-conventions

Warehouse queries are composed from CTEs and must be attributable to an owning team.

## Rules

- Cap the result size: every query needs a `limit` clause.
- Stage the source rows in a CTE named `base` (`with base as (...)`) and select from it.
- Filter date ranges with the half-open pattern `>=` start and `<` end. Never use `between` or `<=` for dates.
- Qualify source tables with the `analytics.` schema.
- Put a header comment `-- Owner: <team>` at the top of the query.
- Write all SQL keywords in lowercase (`select`, `from`, `where`, `join`, `group by`, `order by`).

## Example

Request: Write the SQL query: revenue per country for orders created in January 2026, top 20 countries. Table orders(id, country, amount, created_at, deleted_at). Owning team: growth-analytics.

Output:

```
-- Owner: growth-analytics
with base as (
    select
        o.country,
        o.amount
    from analytics.orders as o
    where o.created_at >= '2026-01-01'
      and o.created_at < '2026-02-01'
)
select
    country,
    sum(amount) as revenue
from base
group by country
order by revenue desc
limit 20
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.