Metric Analysis

Product Analytics Query Generator

Works with ChatGPT, Claude, Gemini, and other AI assistants

Generate SQL queries to analyze [specific user behavior/metric] in our product. Assume a standard data warehouse schema with user, session, event, and conversion tables. Include queries for: 1) Overall trend analysis with week-over-week and month-over-month comparisons, 2) Cohort analysis to track retention and engagement over time, 3) Funnel analysis to identify drop-off points, 4) Segmentation analysis by user attributes (e.g., plan type, geography, acquisition channel), 5) Feature adoption correlation with key outcomes, and 6) Anomaly detection for irregular patterns. Include comments explaining each query's purpose and how to interpret results.

How to Use This Prompt

  1. Copy the prompt using the button above
  2. Replace placeholders in [brackets] with your specific details
  3. Paste into your AI assistant (ChatGPT, Claude, Gemini, etc.)
  4. Iterate as needed - ask follow-up questions to refine the output

Why This Prompt Works

This prompt assumes a standard data warehouse schema and requests six distinct analysis types, each producing a different analytical lens on the same behavior. The requirement for inline comments makes the output educational -- you learn SQL patterns while getting production-ready queries. This means even PMs with limited SQL experience can understand and adapt the results.

When to Use This Prompt

  • Need to quickly pull data for a stakeholder meeting but do not have an analyst available
  • Investigating a sudden change in a key metric and need multiple analytical angles fast
  • Building a self-serve analytics library that your team can reuse and modify over time

Tips for Better Results

  • Share your actual table names and column schemas for queries you can run immediately without modification
  • Specify your SQL dialect (BigQuery, Snowflake, PostgreSQL, Redshift) to get correct syntax and functions
  • Define your date range and any specific user segments you want to filter on for more targeted results

Explore All 100+ Prompts

Browse our complete library of AI prompts designed for product managers.

Browse All Prompts