본문으로 건너뛰기
cccskills
무료GitHub에 공개

sales_analytics

Use defined customer and order tables to build sales analysis queries with consistent business rules. Calculate revenue from completed orders, rank customers by spending, and identify high-value orders using the supplied thresholds and SQL example.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Database schema and business logic for sales data analysis including customers, orders, and revenue.

설치 방법 보기

이럴 때 유용합니다

  • Ranking the top ten customers by revenue over three months
  • Calculating revenue from completed orders
  • Finding orders with a total amount above 1,000
  • Extracting active customers registered at least 90 days ago

포함된 파일(1)

  • SKILL.md1.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Sales Analytics Schema

Tables

customers

  • customer_id (PRIMARY KEY)
  • name
  • email
  • signup_date
  • status (active/inactive)
  • customer_tier (bronze/silver/gold/platinum)

orders

  • order_id (PRIMARY KEY)
  • customer_id (FOREIGN KEY -> customers)
  • order_date
  • status (pending/completed/cancelled/refunded)
  • total_amount
  • sales_region (north/south/east/west)

order_items

  • item_id (PRIMARY KEY)
  • order_id (FOREIGN KEY -> orders)
  • product_id
  • quantity
  • unit_price
  • discount_percent

Business Logic

Active customers: status = 'active' AND signup_date <= CURRENT_DATE - INTERVAL '90 days'

Revenue calculation: Only count orders with status = 'completed'. Use total_amount from orders table.

High-value orders: Orders with total_amount > 1000

Example Query

-- Get top 10 customers by revenue in the last quarter
SELECT c.customer_id, c.name, c.customer_tier, SUM(o.total_amount) as total_revenue
FROM customers c
JOIN orders o ON c.customer_id = o.customer_id
WHERE o.status = 'completed' AND o.order_date >= CURRENT_DATE - INTERVAL '3 months'
GROUP BY c.customer_id, c.name, c.customer_tier
ORDER BY total_revenue DESC LIMIT 10;

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use a defined database structure and business rules to query products, warehouses, stock levels, and stock movements. It supports inventory checks and SQL for identifying products whose combined warehouse stock has reached the reorder threshold.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Checking stock quantities by product and warehouse
  • Finding products at or below their reorder threshold
  • Understanding records for stock movements
alibaba/spring-ai-alibaba1.1만2026년 10월 7일 업데이트

alibaba의 스킬 모두 보기

이 스킬의 문제 신고