generate-sql

Generate optimized SQL queries for BI dashboards with Russian field labels.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/modus-bi/dtp-bi-dashboards --skill generate-sql
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generate-sql
Source: https://github.com/modus-bi/dtp-bi-dashboards/tree/main/skills/generate-sql
Command: npx skills add https://github.com/modus-bi/dtp-bi-dashboards --skill generate-sql

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill generates optimized SQL queries for BI dashboards, ensuring correct sorting, appropriate data types (::INTEGER), rounded values, and Russian field names for clear chart legends.

Core Features & Use Cases

  • Automated SQL patterns for Top-N, Time Series, Year-over-Year comparisons, percentages, correlations, and cohorts.
  • Enforces ORDER BY, proper data types, rounding, and locale-friendly aliases (AS "Регион", etc.).
  • Applicable to requests for dashboards, data extraction templates, and analytic datasets that feed BI visuals.

Quick Start

Ask for a BI SQL query (e.g., "top-10 regions by revenue") and receive a ready-to-run SQL template.

Frequently Asked Questions about generate-sql

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

FAQPage Schema
How do I generate SQL queries for BI dashboards with proper sorting and data types?

SQL query generation for BI dashboards uses predefined patterns like Top-N and Time Series while enforcing ORDER BY, ::INTEGER casting, and ROUND functions to ensure optimized, dashboard-ready outputs with correct data types and sorting.

What SQL patterns are available for dashboard-ready data extraction?

Available SQL patterns for dashboard-ready data extraction include Top-N rankings, Time Series tracking, Year-over-Year comparisons, percentage distributions, correlations, and cohorts. These templates provide structured analytic datasets that feed directly into BI visuals.

How do I handle NULL values and rounding when writing BI SQL queries?

Handling NULL values and rounding in BI SQL queries involves applying enforced data-quality rules, including NULL handling logic, ROUND functions for decimal precision, and ::INTEGER casting to ensure clean, chart-ready datasets.

Can I use localized Russian field labels in SQL queries for BI chart legends?

Yes, you can generate SQL queries with localized Russian field labels by using locale-friendly aliases like AS "Регион" directly in the query, producing clear Russian chart legends for BI dashboards without manual translation.

What is the best way to write a Year-over-Year comparison query for a dashboard?

The best way to write a Year-over-Year comparison query for a dashboard is to use a predefined YoY SQL pattern that enforces proper ORDER BY sorting and data-type casting. This produces optimized, dashboard-ready datasets for time-based comparisons.

Why does my BI dashboard SQL query fail to sort or round values correctly?

BI dashboard SQL queries fail to sort or round values correctly when missing ORDER BY clauses or ROUND functions disrupt data formatting. Enforcing syntax, performance, and data-quality rules like ::INTEGER casting and NULL handling resolves these output errors.