SQLGlot - Translate SQL dialects to and from another

SQLGlot can understand and analyze SQL queries written in various dialects, including popular ones like StarRocks, DuckDB, Presto/Trino, Spark/Databricks, Snowflake, and BigQuery. It can then translate those queries to different dialects , making it easier to migrate data or run the same query on different platforms.

https://sqlglot.com/sqlglot.html