Warehouse SQL style

SkillDatabases & data

How to query the shop warehouse (tables, joins, date ranges).

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.

Then ask your AI: use the Warehouse SQL style skill

What this skill tells your AI

The instructions your AI receives, as published by everruns/everruns in examples/serve/revenue-analyst/agent/skills/sql-style/SKILL.md and read by ahel’s review.

Tables:

  • orders(id INTEGER, placed_at TEXT /* YYYY-MM-DD */, amount_cents INTEGER)
  • refunds(order_id INTEGER, refunded_at TEXT, amount_cents INTEGER)

Rules:

  1. Money is stored in cents. Divide by 100.0 only in the final projection.
  2. Net revenue = SUM(o.amount_cents - COALESCE(r.amount_cents, 0)) with LEFT JOIN refunds r ON r.order_id = o.id.
  3. Date ranges are half-open: placed_at >= :start AND placed_at < :end.
  4. Always filter by date. A query without WHERE scans every order and needs a person's approval.

Signals

GitHub stars
54
Forks
5
Last commit
Oct 2026
Advanced
Item type
skill
Key
sql-style
Source
github.com/everruns/everruns