sales_analytics

Analyze sales data with a relational schema for customers, orders, and order_items.

Updated Apr 17, 2026
One-click install
npx skills add https://github.com/xiaoli123/agentscope-core --skill sales-analytics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sales_analytics
Source: https://github.com/xiaoli123/agentscope-core/tree/main/agentscope-examples/multiagent-patterns/skills/src/main/resources/skills/sales_analytics
Command: npx skills add https://github.com/xiaoli123/agentscope-core --skill sales-analytics

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Sales analytics can be time-consuming to model and query across multiple related tables. This Skill provides a ready-to-use schema and logic framework to analyze customers, orders, and revenue, enabling faster, accurate insights.

Core Features & Use Cases

  • Data modeling: customers, orders, order_items tables with key relationships and constraints.
  • Revenue calculations: compute total revenue from completed orders and segment by region or customer_tier.
  • Use Case: Identify top customers by revenue in a given period and monitor trends across quarters.

Quick Start

Create a query to fetch the top 10 customers by revenue for the last quarter.

Frequently Asked Questions about sales_analytics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate total revenue from completed orders using SQL?

To calculate revenue from completed orders in SQL, you query the order_items table joined with orders, filtering for completed order status and summing the line item totals to generate aggregate revenue figures.

What is the best way to identify high-value customers by revenue in a given period?

Identifying high-value customers by revenue requires joining the customers, orders, and order_items tables, then grouping by customer ID and sorting the aggregated purchase totals in descending order for the target period.

How does relational data modeling work for sales analytics across customers and orders?

Relational data modeling for sales analytics works by structuring customers, orders, and order_items tables with key relationships and constraints, enabling structured queries to reveal revenue patterns and customer behavior.

Can I segment revenue calculations by region and customer tier with this data model?

Yes, you can segment revenue calculations by region and customer tier by filtering and grouping aggregated order_items data based on the geographical and categorical attributes stored in the related customers table.

Do I need a specific database schema to analyze sales trends across quarters?

You need a database schema containing customers, orders, and order_items tables with established relationships to analyze sales trends, enabling time-based grouping to monitor revenue fluctuations across quarters.

What are the limitations of using structured relational schemas for sales data analysis?

Structured relational schemas require pre-defined table relationships and constraints for sales data, meaning schema modifications are needed if new data sources or non-relational formats are introduced to the analytics workflow.