SQL / field notebookinformation · original MIT instructions
Business question → explained query

Make the result grain explicit.

Turn your schema and a precise question into SQL you can inspect, explain and test. Keep the joins, filters and money definitions visible.

ACTUAL SQLITE RESULT / FICTIONAL FIXTURE
OfficeOrdersMealsNet cents
Alder Studio26067850
Birch Software14046000
Cedar Works000

A real execution on invented data: three office rows, including the office with zero qualifying activity. SQLite only; no production data was accessed.

01 / THE WORK

From a question to a reviewable query

You supply the meaning

Table names, types, keys and relationships; the SQL dialect; the question; filters; date boundaries; and the expected row grain. If the schema is in a document or a diagram description, the assistant reads that material first.

You receive an explanation

SQL with comments, a plain-English explanation and performance considerations. When requested, the assistant can also generate sample data, a test script and expected results for review.

The source describes multiple dialects, including PostgreSQL, BigQuery, MySQL, Snowflake and SQL Server. Only SQLite execution was tested for this saved example.
02 / FIT

Useful when the question is known

Works well for

  • Analysts translating a defined reporting question into a query.
  • Product managers learning how joins and aggregations answer a metric request.
  • Engineers preparing a small test fixture before reviewing a generated report.
  • Teams making date, refund and zero-activity rules explicit.

Bring more than a vague goal

  • Missing relationships need clarification; the assistant cannot discover an inaccessible database.
  • The package is not a database connection, a scheduler or a reporting service.
  • Performance suggestions do not replace execution plans and representative measurements.
  • Generated SQL needs review before use with authorized data.
03 / INPUT CONTRACT

Four decisions that shape the answer

01 · GRAIN
One row per office, not one row per meal or order. Aggregating item lines first prevents duplicate order counts.
02 · WINDOW
Normalized UTC timestamps from October 1 inclusive to November 1 exclusive. Boundary events get a defined treatment.
03 · MONEY
Integer cents, minus the total refund recorded for each item line. Meal counts remain quantities ordered.
04 · MISSING ACTIVITY
Keep offices with no qualifying orders. A left join and explicit zero totals preserve those rows.
04 / USE & DEPENDENCIES

A Skill-aware assistant, plus your database engine

Extract the source ZIP and load its folder using your assistant’s supported Skill mechanism, or ask a file-capable assistant to read SKILL.md and follow it. State the subject directly when the upstream instruction uses an argument placeholder. This standalone package does not include the upstream plugin marketplace or slash commands.

A capable language model is required; subscriptions or model usage charges may apply. No additional service API key or web access is required for this workflow. Executing generated SQL requires the matching database engine. The demonstration used Python’s SQLite module and an isolated in-memory database; those test artifacts are evidence, not additional installed Skill capabilities.

Compatibility boundary. A host such as Codex or another file-capable assistant can read these instructions. The saved run was Codex only. Native-client installation and other assistants were not tested.
05 / EVIDENCE

A bounded check, not a universal guarantee

6 / 6Required output sections found in the saved Markdown report.
9 / 9Executable SQLite checks passed, including exact expected rows, month boundaries and empty-month behavior.
6 filesPackage inventory verified, including original source and MIT license, distribution documentation and artwork.

Counts are rule checks on one saved run. No speed comparison, production integration or cross-dialect benchmark was performed.

06 / SOURCE & ARTWORK

Original instructions, visible provenance

AI-generated SQL Query Generator promotional artwork

MIT license · copyright 2026 Pawel Huryn. The original SKILL.md and license bytes are preserved at the pinned commit.

AI-generated promotional artwork. It is not a screenshot of this run or evidence of application behavior. The distributed cover is an opaque 1024 × 1024 WebP.