We have some SQL query which works correctly on MSSQL, Oracle and H2. There are two items to clarify: