본문으로 건너뛰기
Skillpedia
데이터베이스47k · #6317

sql-reporting

하는 일

데이터 웨어하우스에서 지표나 보고서를 뽑는 SQL을 쓸 때 쓰는 체크리스트를 에이전트에 제공합니다. 데이터 테이블에서 믿을 만한 수치를 얻어야 하는 분석가와 사람들을 위한 스킬입니다.

사용하는 경우

  • ✓웨어하우스 테이블에서 뽑을 지표, 보고서, 대시보드 수치를 요청할 때.
  • ✓개수, 합계, 이동 기간을 집계해야 하는 쿼리일 때.
  • ✓두 개 이상의 테이블을 합쳐야 하는 보고서가 있는 경우.

스킬 링크

https://github.com/apache/airflow/blob/main/providers/common/ai/src/airflow/providers/common/ai/example_dags/skills/sql-reporting/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/apache/airflow/blob/main/providers/common/ai/src/airflow/providers/common/ai/example_dags/skills/sql-reporting/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“우리 웨어하우스 테이블에서 이번 달 주문 수를 지역별로 세는 쿼리를 작성해 주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 날짜로 먼저 필터링하고 모든 합계에 이름을 붙이는 등 정해진 규칙을 따릅니다. 쿼리를 짧은 검토 목록으로 확인한 뒤, SQL과 한 문장 요약을 돌려줍니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

<!-- 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.

자주 묻는 질문

SELECT *는 왜 피하나요?

스킬은 열 이름을 명시적으로 나열하라고 말합니다. 그래야 쿼리가 명확하고 점검하기 쉽습니다.

쿼리가 읽는 데이터 양을 제한하나요?

예. 날짜나 파티션 열로 먼저 필터링하고, 탐색용 쿼리에는 제한을 추가하라고 합니다.

답변은 어떤 모습인가요?

최종 SQL이 코드 블록으로 나오고, 그 뒤에 쿼리가 무엇을 반환하는지 설명하는 한 문장이 붙습니다.

상세 정보

작성자의 원본 설명

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

repo: apache/airflow

인기도

GitHub 스타
47k
순위
#6317
라이선스
Apache-2.0
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

비슷한 스킬