SQL Converter · PostgreSQL → BigQuery
Convert PostgreSQL SQL to BigQuery
PostgreSQL to BigQuery swaps "double quotes" for `backtick` table refs, || for CONCAT() and now() for CURRENT_TIMESTAMP(). 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
BigQuery — converted
What changes from PostgreSQL to BigQuery
| PostgreSQL | BigQuery | Why |
|---|---|---|
| FROM users | FROM `proj.dataset.users` | BigQuery references fully-qualified, backtick-quoted table names. |
| a || b | CONCAT(a, b) | BigQuery uses CONCAT(); || is not a string operator. |
| now() - INTERVAL '7 days' | TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 7 DAY) | Timestamp math uses TIMESTAMP_SUB. |