SQLFormatter
FormatterConvertPricingDocsGet Pro
SQL Converter · PostgreSQLSnowflake

Convert PostgreSQL SQL to Snowflake

PostgreSQL to Snowflake keeps "quotes", ::casts and ILIKE, but maps JSONB ->> access to VARIANT colon-paths and STRING_AGG to LISTAGG. A mechanical formatter only re-indents — it won’t rewrite dialect-specific syntax. The AI converter in the app translates the query and the table below shows exactly what changes.

PostgreSQL — source
PostgreSQL
SELECT o.id,
       o.data->>'plan' AS plan,
       STRING_AGG(t.tag, ',') AS tags
FROM orders o
JOIN tags t ON t.order_id = o.id
WHERE o.data->>'status' = 'paid'
GROUP BY o.id, plan;
Snowflake — converted
Snowflake
SELECT o.id,
       o.dataplanstring AS plan,
       LISTAGG(t.tag, ',') AS tags
FROM orders o
JOIN tags t ON t.order_id = o.id
WHERE o.datastatusstring = 'paid'
GROUP BY o.id, plan;
Convert your own query

What changes from PostgreSQL to Snowflake

PostgreSQLSnowflakeWhy
data->>'plan'data:plan::stringJSONB text access becomes VARIANT colon-path plus a ::string cast.
STRING_AGG(x, ',')LISTAGG(x, ',')Snowflake string aggregation is LISTAGG.
ILIKE / ::castILIKE / ::castBoth are supported in Snowflake and carry over.

Other SQL conversions

PostgreSQLMySQLPostgreSQLT-SQLOracleSnowflakeT-SQLSnowflakeMySQLSnowflakePostgreSQLRedshiftPostgreSQLBigQueryAll conversions →