📊 Data Verified

Write Query

Write optimized SQL: CTEs, window functions, joins. Supports Snowflake, BigQuery, Postgres.

sql data-warehouse queries analytics

When to use

Use when translating a natural-language data need into SQL, building a multi-CTE query with joins and aggregations, optimizing a query against a large partitioned table, or getting dialect-specific syntax for Snowflake, BigQuery, Postgres, or other warehouses.

Examples

Write a cohort analysis query

Build retention cohort SQL from user events

Write a BigQuery query for weekly retention cohorts using our user_events table. I need week 0 through week 12 retention.

Optimize a slow query

Diagnose and improve a poorly performing query

This Snowflake query takes 3 minutes on a 10B row table. Can you optimize it? Here's the current SQL...

Translate between dialects

Convert SQL from one warehouse to another

Convert this MySQL query to BigQuery syntax. I'm migrating our reporting to GCP.