data-write-query

Generate optimized PostgreSQL SQL queries from natural-language data requirements.

520|175|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/evolution-foundation/evo-nexus --skill data-write-query-evolution-foundation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-write-query
Source: https://github.com/evolution-foundation/evo-nexus/tree/main/.claude/skills/data-write-query
Command: npx skills add https://github.com/evolution-foundation/evo-nexus --skill data-write-query-evolution-foundation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the time-consuming work of writing and optimizing SQL by hand, translating a business data question into a safe, performant query tailored to the Evolution stack.

Core Features & Use Cases

  • PostgreSQL-optimized query generation: Produces readable SQL using best practices suitable for the Evo CRM / Evo AI / Evolution services ecosystem.
  • Complex query patterns: Builds queries with multiple CTEs, joins, and aggregations to answer real analytics questions.
  • Performance-aware SQL guidance: Recommends practices like early filtering, avoiding SELECT *, and using EXPLAIN ANALYZE when needed.
  • Dialect support: Uses PostgreSQL by default, with secondary dialects available when explicitly requested (Snowflake, BigQuery, Redshift, Databricks SQL, MySQL/Aurora MySQL, DuckDB, SQLite).

Quick Start

Use the data-write-query skill to generate a PostgreSQL query by running the command: /data-write-query Contagem de assinaturas por plano nos últimos 30 dias

Frequently Asked Questions about data-write-query

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

FAQPage Schema
How do I generate an optimized PostgreSQL query from a natural language data request?

To generate an optimized PostgreSQL query, provide a natural-language data request and the skill translates it into performant SQL using CTEs, joins, and early WHERE pushdowns tailored for the Evolution data stack.

What is the best way to structure complex analytics SQL with multiple CTEs?

The best way to structure complex analytics SQL is decomposing the query into clear CTEs, applying early filtering, avoiding SELECT *, and using EXPLAIN ANALYZE to validate performance for funnel and cohort analysis.

Can I switch the SQL dialect from PostgreSQL to Snowflake or BigQuery?

You can switch SQL dialects from PostgreSQL by explicitly requesting secondary engines like Snowflake, BigQuery, Redshift, Databricks SQL, MySQL, DuckDB, or SQLite for your generated queries.

How do I build a cohort analysis query in PostgreSQL?

To build a cohort analysis query, describe the grouping and time-window requirements in natural language to receive structured SQL with CTE decomposition, aggregates, and ordering optimized for PostgreSQL.

Does query generation support reporting and funnel analysis use cases?

Query generation supports reporting and funnel analysis by translating business data questions into safe, performant SQL queries with appropriate joins, filters, and aggregations for analytics workflows.