sql-analysis

Guide structured SQL data analysis with schema discovery and data sampling.

1.5k|222|Updated Jul 4, 2025
One-click install
npx skills add https://github.com/Datus-ai/Datus-agent --skill sql-analysis-datus-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-analysis
Source: https://github.com/Datus-ai/Datus-agent/tree/main/tests/data/skills/sql-analysis
Command: npx skills add https://github.com/Datus-ai/Datus-agent --skill sql-analysis-datus-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Unstructured, ad-hoc SQL data analysis often leads to inconsistent results, missed insights, and inefficient database exploration. This skill provides a standardized, step-by-step workflow to eliminate these issues and ensure reliable, reproducible analysis outcomes.

Core Features & Use Cases

  • Structured Schema Discovery: Guided process to list available database tables and explore their structure to build a clear understanding of underlying data.
  • Standardized Data Sampling: Consistent approach to previewing table data before running full analysis queries to avoid errors and misinterpretation.
  • Use Case: Data analysts can use this workflow to quickly investigate sales performance trends by first exploring the orders and products tables, then running targeted queries to identify top-performing categories and seasonal patterns.

Quick Start

Request a guided SQL analysis of the company's sales database to identify the top 5 product categories by revenue in the last quarter.

Frequently Asked Questions about sql-analysis

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

FAQPage Schema
What is a structured SQL data analysis workflow?

A structured SQL data analysis workflow standardizes database exploration by guiding you through schema discovery, data sampling, and targeted metric trend analysis to eliminate inconsistent ad-hoc querying practices.

How do I explore database schema and sample data before running SQL queries?

You explore database schema and sample data by using integrated db_tools utility functions to execute schema discovery and data sampling, ensuring a clear understanding of underlying tables before running full analysis queries.

Can I use this SQL analysis workflow for data engineer use cases?

Yes, this SQL analysis workflow applies to both data analyst and data engineer use cases, supporting database schema exploration, sample data review, and targeted metric trend analysis within connected databases.

What's the best way to analyze sales performance trends using SQL?

The best way to analyze sales performance trends is following a standardized workflow: explore relevant tables like orders and products, preview sample data, then run targeted queries to identify top-performing categories and seasonal patterns.

Do I need db_tools to perform database exploration with this workflow?

Yes, this workflow requires integration with db_tools utility functions to execute schema discovery, data sampling, and custom analysis queries against your connected databases.

Why does ad-hoc SQL querying lead to inconsistent data insights?

Ad-hoc SQL querying leads to inconsistent data insights because unstructured exploration misses underlying table relationships and skips standardized data sampling, resulting in misinterpretations and inefficient database exploration.