We parse your SQL completely, and can give it back exactly as you wrote it, comments and casing included.
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.
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.
select o.customer_id, count(*) as n,sum(o.total) as revenue from orders ojoin customers c on c.id=o.customer_idwhere o.status in ('paid','shipped')and o.created_at >= '2026-01-01'group by o.customer_id order by revenue descSELECT o.customer_id, count(*) AS n, sum(o.total) AS revenueFROM orders oJOIN customers c ON c.id = o.customer_idWHERE o.status IN ('paid', 'shipped') AND o.created_at >= '2026-01-01'GROUP BY o.customer_idORDER BY revenue DESCdquery 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.totalFROM orders otable analytics.public.ordersJOIN customers ctable analytics.public.customers ON c.id = o.customer_idcolumns customers.id, orders.customer_idWHERE o.status IN ('paid', 'shipped')column orders.statusGROUP BY o.customer_idcolumn orders.customer_idORDER BY revenue DESCoutput revenue, from the select listEach of these tools works from the same parse of your SQL. You can use two of them today, and we are building the rest.