AVG(expr) — identical everywhere. Note: integer-typed columns are
averaged as an exact/decimal type in PostgreSQL, MSSQL, Oracle, Db2, and
Snowflake, but MySQL/MariaDB/SQLite/ClickHouse promote to floating point;
cast explicitly (e.g. cast(col('x'), 'DECIMAL(10,2)')) if exact decimal
averaging is required across dialects.
AVG(expr)— identical everywhere. Note: integer-typed columns are averaged as an exact/decimal type in PostgreSQL, MSSQL, Oracle, Db2, and Snowflake, but MySQL/MariaDB/SQLite/ClickHouse promote to floating point; cast explicitly (e.g.cast(col('x'), 'DECIMAL(10,2)')) if exact decimal averaging is required across dialects.