What problem does it solve?
This Skill helps turn a product or business question into production-ready SQL that matches the metric definitions in PMContext instead of guessing the logic. It reduces the common risk of writing a query that runs successfully but answers the wrong business question because the retention, user segment, or KPI definition is inconsistent.
Core Features & Use Cases
- PMContext-aligned SQL generation: Reads metric definitions, user scenarios, and global constraints from PMContext so queries follow the agreed business logic.
- Natural language to SQL workflow: Explains the query logic in plain language before generating SQL, making it easier for PMs and stakeholders to validate the approach.
- Multi-dialect support with safeguards: Adapts output for BigQuery, PostgreSQL, MySQL, Snowflake, and similar SQL environments, while flagging missing schema, dialect ambiguity, or metric conflicts.
- Performance and validation guidance: Adds optimization suggestions such as indexes, partitions, or materialized views, and includes validation queries for result checking.
- Use cases: Suitable for retention analysis, KPI reporting, cohort support queries, experiment data pulls, and translating natural-language analytics requests into traceable SQL artifacts.
Quick Start
Ask the pm-sql skill to read PMContext and your schema, explain the query logic for your business question, then generate the correct SQL with performance notes and validation checks for your target database dialect.