SafeDrop LogoPivotSQL
Make Reports with SQL
With pivot breakdowns and number formats. Works anywhere SQL does. 100% Automatic
measures:
    Total Sales:
        query: sum(sales)
        format: currency
    Total Revenue:
        query: sum(revenue)
        format: currency
    Margin:
        query: $"Total Revenue" / $"Total Sales"
        format: percentage
breakdown:
    rows:
        - Product
Report example

It's as easy as ABC

A

Describe report.

Show this measure, and breakdown by that column. That's it.

table: sales
columns:
  region:
    unique_values: [West, Central, East]
measures:
  total_sales:
    query: sum(sales)
    format: currency.2
breakdown:
  columns:
    - region
B

Copy compiled SQL.

Instantly get a SQL query that transform data into your report.

WITH rawdata AS (
    SELECT region
        , CONCAT('$', format_number(sum(sales), 2)) AS total_sales
    FROM sales
    GROUP BY region
)
SELECT MAX(CASE WHEN region = 'West' THEN total_sales END) AS West_total_sales
    , MAX(CASE WHEN region = 'Central' THEN total_sales END) AS Central_total_sales
    , MAX(CASE WHEN region = 'East' THEN total_sales END) AS East_total_sales
FROM rawdata
C

Paste and Run SQL

to get pivot table. Works anywhere SQL does.

Paste and get result

Supercharges Your Favourite Databases

MySQL
MySQL
Databricks
Databricks
Spark SQL
Spark SQL
PostgreSQL
PostgreSQL
SQLite
SQLite

Built for Your Most Demanding Data Workflows

Pivot Big Data Instantly

Transform billions of rows with lightning-fast pivoting. Interact with data at speeds dashboards can't match.

Streamlined Reporting

Generate clean, repeatable reports from structured pivots. Perfect for daily, weekly, and automated insights. Why post-process with Python when you can nail it with just SQL?

Maintainable SQL at Scale

Break down sprawling SQL into reusable modular pieces. Make your team’s data logic consistent and sustainable.