> does anybody know of a program or a library that takes standard SQL queries as input and outputs one or multiple equivalent queries using the SQL dialects of a set of DBMSs?
There are a number of tools that translate queries between SQL dialects. Google for “sql dialect translator”.