본문으로 건너뛰기
Skillpedia
분석 및 스프레드시트6.2k · #14401

table-calculations

하는 일

이 스킬은 Lightdash 지표 쿼리의 테이블 계산을 작성하는 방법을 설명합니다. 쿼리 결과 위에서 비교, 백분율, 순위가 필요한 분석가를 위한 스킬입니다.

사용하는 경우

  • ✓Lightdash 쿼리에서 전체 대비 비율이나 백분율이 필요할 때.
  • ✓결과의 누적 합계, 이동 평균, 순위가 필요할 때.
  • ✓기간 대비 변화나 각 그룹의 상위 항목이 필요할 때.

스킬 링크

https://github.com/lightdash/lightdash/blob/main/packages/backend/src/ee/services/ai/skills/builtInSkills/table-calculations/SKILL.md

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

사용 방법

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

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

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

AI에게 요청하는 예시

“월별 매출 Lightdash 쿼리에 누적 합계 열과 전월 대비 변화 열을 추가해 주세요.”

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

작동 방식

스킬은 테이블 계산에 쓰는 스프레드시트 스타일 수식 문법을 설명합니다. 선택한 필드와 다른 계산을 참조하는 방법, 백분율 서식 옵션을 쓰는 방법을 보여 줍니다.

기술 내용 (원본 SKILL.md)

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

Table calculations

For run_metric_query, author queryConfig.tableCalculations as type formula. The input schema documents the syntax and required fields; use spreadsheet-like formulas, not raw SQL.

Calculations operate on query results after aggregation. Reference selected field IDs or other table calculation names. The names below are placeholders: replace them with the actual fields or calculations in your query. Do not add grouping dimensions unless the user requested that grain.

When to use them

  • Arithmetic across metrics: metric_a + metric_b, ratios metric_a / metric_b.
  • Aggregating already-aggregated metrics (e.g., average of monthly totals): AVG(metric).
  • Percent of total: m / SUM(m).
  • Period-over-period: (m - LAG(m, ORDER BY date)) / LAG(m, ORDER BY date).
  • Rankings: RANK(ORDER BY m DESC).
  • Running totals: RUNNING_TOTAL(m, ORDER BY date).
  • Trailing 3-period average: MOVING_AVG(m, 2, ORDER BY date). The second argument counts preceding rows; the current row is also included.
  • Top N per group: ROW_NUMBER(PARTITION BY group, ORDER BY m DESC), then filter on that calculation.

Use the schema's formatting options for ratios and percentage changes; do not multiply a fraction by 100 when using percent formatting.

자주 묻는 질문

테이블 계산은 SQL인가요?

아니요, 원시 SQL이 아니라 쿼리 결과에 작동하는 스프레드시트와 비슷한 수식을 사용합니다.

그룹화를 바꾸나요?

아니요, 결과에 작동하며 요청하지 않으면 그룹화 필드를 추가하지 않습니다.

백분율은 어떻게 표시하나요?

100을 곱하는 대신 백분율 서식 옵션을 사용합니다.

상세 정보

작성자의 원본 설명

Author formula table calculations for run_metric_query, including ratios, aggregate comparisons, windows and rankings.

repo: lightdash/lightdash

인기도

GitHub 스타
6.2k
순위
#14401
라이선스
—
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬