The way the filter clause is currently implemented seems buggy, and fails to parse expressions like
select max(x) filter(where y) over () from t
which is valid in SQLite and postgres
For instance, the following returns 4 in both postgres and sqlite:
select max(column1) filter (where column1 % 2 = 0) from (values (1),(2),(3),(4),(5)) t
See the FILTER clause on modern-sql.com