Skip to content
cccskills
FreePublished on GitHub

sql-reporting

Write and review SQL for reports and metrics in a data warehouse, a store of analytical data. Applies rules for explicit columns, date filters, aggregate names, and limited exploratory results, returning SQL with a brief explanation.

OriginalShow the original description

Conventions and review steps for writing analytics SQL against the warehouse. Use whenever the task involves querying tables, building a report, or aggregating metrics.

See how to install

Good for

  • Write SQL for report and dashboard metrics
  • Calculate counts, sums, and rolling metrics
  • Combine data from multiple tables
  • Review SQL columns, date filters, and aggregate names

Files included (1)

  • SKILL.md1.4 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

<!-- SPDX-License-Identifier: Apache-2.0 https://www.apache.org/licenses/LICENSE-2.0 -->

SQL Reporting Skill

Apply this skill before writing or running any analytics SQL so reports stay consistent and safe.

When to Use This Skill

Use this skill when the task involves:

  • Querying warehouse tables for a metric, report, or dashboard figure
  • Aggregating rows (counts, sums, rolling windows)
  • Cross-referencing two or more tables

Conventions

  1. Always SELECT explicit column names, never SELECT *.
  2. Filter on a partition/date column first to bound the scan.
  3. Alias aggregates with snake_case names (order_count, not count(*)).
  4. Cap exploratory queries with LIMIT unless an aggregate already collapses the result set.
  5. Prefer COUNT(DISTINCT ...) over a sub-query when de-duplicating.

Review Checklist (run before returning an answer)

  • No SELECT *.
  • A date or partition predicate is present.
  • Every aggregate has an explicit alias.
  • The query reads only from tables the task actually needs.

Output Format

Return the final SQL in a fenced ```sql block, then one sentence describing what the query returns.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

aip-tracker

FreeSummary

Assess Airflow Improvement Proposals by comparing Confluence specifications with pull requests, commits, and codebase files. Produce evidence-backed progress reports showing delivered items, remaining work, and specification updates needed across one or more proposals.

  • Check implementation progress for an Airflow proposal
  • Compare specification deliverables with shipped code
  • Compile a progress report across multiple proposals
apache/airflow47.2KUpdated Oct 18, 2026

aip-user-stories

FreeSummary

Turn Airflow Improvement Proposals into practical guides checked against current code, or proposed user stories for design review before implementation. Organize use cases, distinguish verified examples from speculative code, and capture specific design questions.

  • Create implementation-backed guides for an Airflow proposal
  • Explore user stories before a feature is implemented
  • Separate implemented features from proposed functionality
apache/airflow47.2KUpdated Oct 18, 2026

airflow-java-sdk

FreeSummary

Helps contributors develop and fix Airflow’s Java SDK for JVM tasks. Explains public API boundaries, JAR packaging, Python coordination, communication schema updates, and the test commands used to validate changes.

  • Adding features or fixing bugs in the Java SDK
  • Reviewing public API and internal implementation boundaries
  • Investigating JAR discovery and JVM startup failures
apache/airflow47.2KUpdated Oct 18, 2026

airflow-new-sdk

FreeSummary

Guides contributors through adding a new programming language to Airflow, covering SDK structure, runtime coordination, communication rules, executable packaging, tests, and the documentation and configuration changes needed for a pull request.

  • Adding support for a new programming language
  • Choosing how Airflow launches a language runtime
  • Implementing communication and executable bundles
apache/airflow47.2KUpdated Oct 18, 2026

Draft commit messages, pull request titles and descriptions, and GitHub comments or reviews for Apache Airflow contributions. Follows project wording and AI attribution rules, and helps decide whether a change needs a release note.

  • Draft commit messages and pull request titles
  • Prepare pull request descriptions using the project template
  • Draft GitHub comments and review text
apache/airflow47.2KUpdated Oct 18, 2026

Guides preparation and authorized publication of Apache Airflow changes, including existing pull request checks, remote verification, reviews, tests, rebasing, and a prefilled submission page. Also explains how to track work deferred by temporary fixes.

  • Planning the steps for submitting Airflow changes
  • Checking existing pull requests and Git remote destinations
  • Reviewing and testing changes before pushing
apache/airflow47.2KUpdated Oct 18, 2026

See all skills by apache

Report a problem with this skill