Skip to main content

SQL, understood completely.

We parse your SQL completely, and can give it back exactly as you wrote it, comments and casing included.

  • dfmt is our free formatter. It covers 33 dialects and formats dbt models with their Jinja in place.
  • dquery is the SQL analyzer dfmt is built on. It keeps every token, so a query can be written back exactly as it came in.

SQL dialects

33

And 10 databases that speak one of them, such as Aurora, Neon and Supabase.

Formatting errors

0

Over 28 941 dbt models and 66 809 SQL files.

Tokens lost

0

Over 8 496 765 lines of SQL, each file parsed again after formatting.

AST node types

8 743

Typed and immutable, generated per dialect.

The part you can see.

dfmt is the first product we built on dquery. It is free, with no trial and no sign-up, and formatting some of your own SQL with it is the quickest way to see what dquery can do.

  • 33 dialects, including Snowflake, BigQuery, PostgreSQL, T-SQL, Spark and DuckDB
  • dbt models are rendered by its own Jinja engine, and every tag goes back where you wrote it
  • What fits on a line stays on one, and what does not breaks clause by clause
  • Formatting a formatted file changes nothing: format(format(x)) = format(x)
  • 0 errors and 0 tokens lost over 28,941 dbt models and 66,809 SQL files
What you wrote
select o.customer_id, count(*) as n,
sum(o.total) as revenue from orders o
join customers c on c.id=o.customer_id
where o.status in ('paid','shipped')
and o.created_at >= '2026-01-01'
group by o.customer_id order by revenue desc
Formatted with dfmt
SELECT
o.customer_id,
count(*) AS n,
sum(o.total) AS revenue
FROM orders o
JOIN customers c
ON c.id = o.customer_id
WHERE o.status IN ('paid', 'shipped')
AND o.created_at >= '2026-01-01'
GROUP BY o.customer_id
ORDER BY revenue DESC

And the part you cannot.

dquery works from the same parse, and computes more than a layout. Given the schemas of the tables a query reads, it resolves each name to the table or column it refers to, infers types, and traces each output column back to the columns it came from. This is what it finds in the same query.

SELECT
o.customer_id,column orders.customer_id
count(*) AS n,bigint never null
sum(o.total) AS revenuefrom orders.total
FROM orders otable analytics.public.orders
JOIN customers ctable analytics.public.customers
ON c.id = o.customer_idcolumns customers.id, orders.customer_id
WHERE o.status IN ('paid', 'shipped')column orders.status
GROUP BY o.customer_idcolumn orders.customer_id
ORDER BY revenue DESCoutput revenue, from the select list

One understanding, every tool.

Each of these tools works from the same parse of your SQL. You can use two of them today, and we are building the rest.

Get in touch.