Useful Prompts
A practical reference library of copy-paste ready prompts for common analytical tasks. Replace @[table_name], [column], [metric], etc. with your actual values.
Working with Knowledge
Query and reference your Knowledge base:
What metrics and KPIs are defined in our Knowledge?
Summarize the business rules and data context from our Knowledge
@[data] Analyze this following the definitions in our Knowledge
Which data quality issues should I be aware of based on our Knowledge?
What's our standard calculation method for [metric] according to our Knowledge?
Slash Commands
Tip: For detailed explanations of how slash commands work, syntax, and best practices, see Slash Commands. This section provides ready-to-use templates.
Using /plan for Complex Analyses
/plan @[data]
Outline an approach to [describe your analytical goal]
/plan @[table1] @[table2] @[table3]
I need to [multi-step analysis goal]. Please propose a methodology before executing.
/plan
I want to [goal], but I'm not sure of the best approach. Suggest a plan.
Using /visualize for Charts
Basic charts:
/visualize @[data]
Create a bar chart showing [metric] by [dimension]
/visualize @[time_series]
Line chart of [metric] over time with trend line
Advanced visualizations:
/visualize @[data]
Create a heatmap showing [metric] with [dimension1] as rows and [dimension2] as columns
/visualize @[hierarchical_data]
Treemap visualization showing [metric] broken down by [category] and [subcategory]
/visualize @[flow_data]
Sankey diagram showing flow from [source] through [intermediate_stage] to [destination]
Complex layered charts:
/visualize @[forecast_data]
Create a layered chart combining:
- Bars for historical [metric]
- Line for forecasted values
- Shaded area for confidence interval
- Vertical line marking today's date
Using /recommendations
/recommendations
What should I analyze first with @[new_dataset]?
/recommendations
I've completed [analysis]. What related insights should I explore next?
/recommendations
This is my first time working with this data. Where should I start?
/recommendations
I'm stuck. What would be valuable to analyze given my current data?
Using /taxonomy
Use /taxonomy to automatically discover categories and create classification AI tables.
/taxonomy @[support_tickets]
Classify by customer intent based on the subject and message body
/taxonomy @[products]
Group by product category based on description and name
/taxonomy @[customer_feedback]
Classify by sentiment and feedback type from the comment text
/taxonomy @[emails]
Discover and classify email topics from subject lines and body text
/taxonomy @[issues]
Categorize by issue type and severity from the issue description
/taxonomy @[reviews]
Classify by topic and sentiment from customer review text
Getting Started with Data
Initial Exploration
@[table_name]
Show me an overview: column names, data types, row count, and 5 sample rows
@[table_name]
Generate descriptive statistics for all numeric columns: count, mean, median, min, max, standard deviation
@[table_name]
Summarize this table: how many rows, what time period does it cover, what are the key columns?
Data Quality Assessment
@[table_name]
Identify data quality issues:
- Columns with null values (show percentage)
- Duplicate rows
- Potential outliers in numeric columns
@[table_name]
Show me the distribution of values in the [column_name] column
@[table_name]
Find records with missing or null values in [critical_column]
@[table_name]
Check for duplicates based on [id_column] and show me any duplicates found
Data Cleaning & Preparation
Filtering and Cleaning
@[data]
Create a cleaned view that:
- Removes rows where [column] is null
- Filters to only [condition]
- Excludes [specific criteria]
@[messy_data]
Clean this data by:
1. Removing nulls in [critical_columns]
2. Deduplicating based on [id_column], keeping the most recent record
3. Standardizing [text_column] to lowercase and trimming whitespace
@[data]
Filter to only include records where:
- [column1] = '[value]'
- [date_column] is between [start_date] and [end_date]
- [numeric_column] > [threshold]
Handling Missing Data
@[data]
For rows with null values in [column], fill with [default_value]
@[data]
Create a column [is_complete] that flags whether the record has all required fields populated
Data Standardization
@[data]
Standardize the [date_column] to YYYY-MM-DD format
@[data]
Convert [text_column] to title case and remove leading/trailing spaces
@[data]
Standardize [category_column]: map [old_value1] to [new_value1], [old_value2] to [new_value2]
Calculating Metrics & KPIs
Revenue Metrics
@[transactions]
Calculate total revenue, average transaction value, and transaction count
Group by month and show with month-over-month growth rates
@[subscriptions]
Calculate MRR (Monthly Recurring Revenue): sum of subscription amounts where status = 'active'
@[sales]
Calculate gross revenue, net revenue (after refunds), and average order value
Customer Metrics
@[customers] @[transactions]
Calculate customer lifetime value (LTV): total revenue per customer since their first purchase
@[customers]
Calculate customer acquisition cost (CAC): total_marketing_spend / new_customers_this_period
@[user_activity]
Calculate daily active users (DAU), weekly active users (WAU), and DAU/WAU ratio
Business Metrics
@[data]
Calculate [metric_name] as: [formula]
Group by [dimension] and show totals
@[transactions]
Calculate conversion rate: (completed_transactions / total_visitors) * 100
@[inventory]
Calculate inventory turnover: cost_of_goods_sold / average_inventory_value
Time-Based Analysis
Trends Over Time
@[daily_data]
Show [metric] trend over time with:
- 7-day moving average
- 30-day moving average
@[time_series_data]
Calculate week-over-week and month-over-month percentage changes for [metric]
@[monthly_data]
Add year-over-year comparison: show this year vs last year for each month
Seasonality and Patterns
@[historical_data]
Identify seasonal patterns in [metric]: compare performance by month across all years
@[data]
Show [metric] by day of week to identify weekly patterns
@[sales_data]
Compare [metric] across quarters and years to identify trends and cycles
Growth Calculations
@[data]
Calculate cumulative [metric] over time
@[revenue_data]
Calculate compound monthly growth rate (CMGR) for [time_period]
@[time_series]
Show [metric] with:
- Actual values
- Growth rate (%)
- Year-over-year change
- Cumulative total
Aggregation & Grouping
Simple Aggregations
@[data]
Group by [dimension] and calculate:
- Count of records
- Sum of [metric]
- Average of [metric]
- Min and max values
@[transactions]
Show top 10 [dimension] by [metric], sorted descending
@[data]
Calculate totals by [dimension], and show each item's percentage of the total
Multi-Level Grouping
@[data]
Group by [primary_dimension] and [secondary_dimension]
Show totals for [metric] at each level
@[sales]
Create a summary with:
- Region as primary grouping
- Product category as secondary grouping
- Show revenue totals at both levels
Pivot Tables
@[data]
Create a pivot table with:
- Rows: [dimension1]
- Columns: [dimension2]
- Values: sum of [metric]
@[sales_data]
Pivot table showing [metric] by [row_dimension] and [column_dimension]
Include row totals and column totals
Segmentation & Categorization
Creating Segments
@[customers]
Segment customers into groups based on [metric]:
- High: [metric] > [threshold1]
- Medium: [metric] between [threshold2] and [threshold1]
- Low: [metric] < [threshold2]
@[data]
Create quartiles for [metric] and assign each record to a quartile group
@[customers] @[transactions]
Segment customers using RFM analysis:
- Recency: days since last purchase
- Frequency: number of purchases
- Monetary: total amount spent
Create 4 segments: VIP, Active, At-Risk, Inactive
Conditional Categorization
@[data]
Create a new column [category] based on rules:
- If [condition1], then [value1]
- If [condition2], then [value2]
- Otherwise, [default_value]
@[customers]
Flag customers as:
- 'At Risk' if no purchase in 90 days but active before
- 'Active' if purchased in last 90 days
- 'Churned' if no purchase in 180+ days
Joining Multiple Tables
Basic Joins
@[table1] @[table2]
Join these tables on [key_column] and show:
- [columns from table1]
- [columns from table2]
@[orders] @[customers]
Join orders with customer information
Include: customer name, order date, order amount, customer segment
Specific Join Types
@[table1] @[table2]
LEFT JOIN to include all records from [table1], even if no match in [table2]
Join on [key_column]
@[table1] @[table2]
INNER JOIN to include only records that exist in both tables
Join on [key_column]
Multi-Table Joins
@[table1] @[table2] @[table3]
Join all three tables:
- Join [table1] with [table2] on [key1]
- Then join result with [table3] on [key2]
Show: [list specific columns needed]
@[transactions] @[customers] @[products]
Join to create a complete view showing:
- Customer name and segment
- Product name and category
- Transaction date and amount
Comparative Analysis
Side-by-Side Comparisons
@[data]
Compare [dimension_values] side by side across all metrics
Show: [metric1], [metric2], [metric3]
Rank by [key_metric]
@[sales]
Compare regional performance:
- Show revenue, growth rate, and market share for each region
- Rank regions by revenue
- Highlight top and bottom performers
Before/After Analysis
@[data]
Compare 30 days before and after [event_date]:
- Calculate averages for each period
- Show absolute difference and percentage change
- Highlight significant changes
@[metrics]
Show before/after comparison for [event]:
- Period 1: [date_range1]
- Period 2: [date_range2]
Compare: [list metrics to compare]
Benchmarking
@[data]
For each [dimension], show:
- Actual [metric]
- Average [metric] across all dimensions
- Difference from average
- Percentage above/below average
@[performance_data]
Compare actual results against targets:
- Show actual vs target for each [dimension]
- Calculate gap (actual - target)
- Flag items above and below target
Trend Detection & Forecasting
Identifying Trends
@[time_series]
Identify trend direction: is [metric] increasing, decreasing, or stable over [time_period]?
@[data]
Find the [n] dates/periods with highest and lowest [metric] values
Explain any notable spikes or drops
Anomaly Detection
@[time_series_data]
Identify anomalies in [metric]:
- Flag values more than 2 standard deviations from the mean
- Show the anomalous dates and values
@[daily_metrics]
Find days where [metric] differs significantly from the expected pattern
Expected pattern: [describe, e.g., "similar to same day of previous weeks"]
Moving Averages
@[daily_data]
Calculate moving averages for [metric]:
- 7-day MA
- 30-day MA
- 90-day MA
@[data]
Add a [n]-period moving average to smooth out short-term fluctuations
Cohort & Retention Analysis
Cohort Creation
@[customers]
Create monthly cohorts based on [signup_date]
Calculate cohort size and key metrics for each cohort
@[users] @[activity]
Group users into cohorts by signup month
Track activity for each cohort over subsequent months
Retention Calculations
@[users] @[activity_log]
Calculate monthly retention:
- For each signup cohort, show % still active in each subsequent month
- Create a retention curve
@[customers] @[purchase_history]
Calculate repeat purchase rate by cohort:
- What % of customers in each cohort made a second purchase?
- What % made 3+ purchases?
Cohort Comparison
@[user_cohorts]
Compare retention rates across different cohorts
Identify which cohorts have better retention and why
@[cohort_data]
Compare [metric] for cohorts grouped by [characteristic]
Example: Compare retention for users acquired via different channels
Statistical Analysis
Distributions
@[data]
Show the distribution of [metric]:
- Create bins/ranges
- Count records in each bin
- Calculate percentages
@[data]
Calculate percentiles for [metric]: 10th, 25th, 50th (median), 75th, 90th
Correlations
@[data]
Analyze the relationship between [metric1] and [metric2]
Is there a positive, negative, or no correlation?
@[data]
Create a correlation matrix for metrics: [list metrics]
Identify which metrics are most closely related
Statistical Summaries
@[data]
Generate comprehensive statistics for [metric]:
- Count, sum, average
- Median, mode
- Min, max, range
- Standard deviation, variance
- Quartiles
Advanced SQL Operations
Window Functions
@[data]
Create a running total of [metric] ordered by [date_column]
@[sales]
Rank products by [metric] within each [category]
Use DENSE_RANK so tied values get the same rank
@[events]
For each user, number their events sequentially (1, 2, 3...)
Order by event_date
LAG/LEAD Operations
@[time_series]
Add a column showing the previous period's [metric] value
Calculate the change from previous period
@[data]
Compare each record's [metric] to the next record's value
Ordered by [sort_column]
Complex Calculations
@[data]
Calculate [metric] on a rolling [n]-period basis:
- For each date, calculate sum/average of [n] periods including current
@[transactions]
Calculate time difference between consecutive transactions for each customer
Show average time between purchases
Visualization Templates
Time Series Visualizations
/visualize @[time_series]
Line chart showing [metric] over time with trend line
/visualize @[daily_metrics]
Create an area chart for [metric] over time
Shade the area below the line for visual emphasis
/visualize @[multiple_metrics]
Multi-line chart showing [metric1], [metric2], and [metric3] on the same chart
Use different colors for each line with a legend
/visualize @[seasonal_data]
Calendar heatmap showing daily [metric] with color intensity based on value
/visualize @[time_series]
Horizon chart showing [multiple_series] compactly stacked
Comparison Visualizations
/visualize @[category_data]
Bar chart comparing [metric] across [categories]
Sort bars from highest to lowest
/visualize @[regional_data]
Horizontal bar chart showing [metric] by region
Color bars based on performance: green if above target, red if below
/visualize @[comparison_data]
Grouped bar chart with:
- X-axis: [dimension]
- Bars grouped by [category]
- Y-axis: [metric]
/visualize @[before_after]
Slope chart showing change in [metric] from [period1] to [period2]
One line per [entity] connecting the two values
/visualize @[target_comparison]
Bullet chart showing actual vs target for each [dimension]
Include markers for goals and thresholds
Distribution Visualizations
/visualize @[data]
Histogram showing distribution of [metric]
Use [n] bins
/visualize @[data]
Box plot comparing distribution of [metric] across [categories]
Show median, quartiles, and outliers
/visualize @[data]
Violin plot showing distribution shape for [metric] across [categories]
/visualize @[segments]
Ridgeline plot (joy plot) showing overlapping distributions for each [segment]
Relationship Visualizations
/visualize @[data]
Scatter plot with:
- X-axis: [metric1]
- Y-axis: [metric2]
- Add trend line to show correlation
/visualize @[data]
Bubble chart with:
- X-axis: [metric1]
- Y-axis: [metric2]
- Bubble size: [metric3]
- Color: [category]
/visualize @[correlation_data]
Correlation matrix heatmap for [list of metrics]
Use color intensity to show correlation strength
/visualize @[multi_dimensional]
Parallel coordinates plot to compare [items] across [multiple metrics]
Composition Visualizations
/visualize @[data]
Pie chart showing [metric] by [category]
Show percentages on each slice
/visualize @[hierarchical_data]
Treemap showing [metric] broken down by [category] and [subcategory]
Size rectangles by [metric], color by [category]
/visualize @[time_series_categories]
Stacked area chart showing how [categories] contribute to total [metric] over time
/visualize @[hierarchical_data]
Sunburst diagram showing [metric] with multiple levels of hierarchy
Inner ring: [level1], outer rings: [level2], [level3]
Flow & Process Visualizations
/visualize @[flow_data]
Sankey diagram showing flow from [source] → [intermediate] → [destination]
Flow thickness represents [metric]
/visualize @[funnel_data]
Funnel chart showing conversion through stages:
[stage1] → [stage2] → [stage3] → [stage4]
Show drop-off between each stage
Advanced Layered Charts
/visualize @[actual_and_forecast]
Layered chart combining:
- Bars: historical [metric]
- Line: forecasted [metric]
- Shaded area: confidence interval
- Vertical line: marking today (start of forecast)
/visualize @[comparison_data]
Dual-axis chart with:
- Left Y-axis: [metric1] as bars
- Right Y-axis: [metric2] as line
- X-axis: [time or category]
/visualize @[complex_data]
Small multiples: create one chart per [dimension]
Each showing [metric] over [time/category]
Arrange in grid layout for easy comparison
Interactive Visualizations
/visualize @[data]
Interactive scatter plot where:
- Clicking a point highlights it and shows details
- Hovering shows tooltip with all values
- Include filters to show/hide categories
/visualize @[multi_series]
Line chart with legend checkboxes
Allow showing/hiding individual series by clicking legend items
/visualize @[dashboard_data]
Create an interactive dashboard with:
- Multiple linked charts
- Filtering one chart filters all others
- Include: [specify chart types and metrics]
Quality Checks & Validation
Data Integrity Checks
@[data]
Verify data integrity:
- Check for negative values in [metric] (should be positive)
- Ensure [date_column] is within expected range
- Confirm [category_column] only contains expected values
@[transactions]
Validation checks:
- All transaction amounts > 0
- All dates are not in the future
- All customer_ids exist in the customers table
Duplicate Detection
@[data]
Find duplicate records based on [key_columns]
Show all instances of each duplicate
@[data]
Count duplicates per [id_column]
Show which IDs appear more than once and how many times
Balance & Reconciliation
@[financial_data]
Verify that debits equal credits for each [account]
Show any accounts that don't balance
@[data]
Cross-check totals: sum of [detail_metric] should equal [summary_metric]
Identify any discrepancies
Outlier Detection
@[data]
Identify outliers in [metric] using the IQR method:
- Calculate Q1, Q3, and IQR
- Flag values < Q1 - 1.5*IQR or > Q3 + 1.5*IQR
@[data]
Find extreme values in [metric]:
- Values more than 3 standard deviations from mean
- Show the outliers with their actual values
Tips for Using These Templates
Customization:
- Replace
@[table_name]with your actual table names - Replace
[column],[metric],[dimension]with your actual field names - Adjust date ranges, thresholds, and conditions to match your data
Combining Templates: Many templates can be combined for more complex analyses:
/plan
Step 1: [Use a cleaning template]
Step 2: [Use an aggregation template]
Step 3: [Use a visualization template]
Adding Context: Enhance any template by adding:
- Time range constraints
- Specific filters
- Sort order preferences
- Output format requirements
Iteration: Start with a basic template and refine:
# Round 1: Use template as-is
@[sales] Calculate total revenue by month
# Round 2: Add specificity
@[sales] Calculate total revenue by month, exclude refunds
# Round 3: Add comparison
@[sales] Calculate total revenue by month, exclude refunds, add YoY comparison
# Round 4: Visualize
/visualize @[monthly_revenue_view] Create a line chart with YoY comparison
Save Your Own Templates
As you develop prompts that work well for your specific use cases, save them for reuse:
- Create a personal prompt library document
- Categorize by business function (sales analysis, customer analysis, etc.)
- Note what makes each prompt effective
- Update when you discover improvements
This becomes a valuable time-saver and knowledge base for your team.