I have this SQL request, works fine in PostgreSQL, but throws an error "Java::JavaSql::SQLSyntaxErrorException: ORA-00905: missing keyword" in Oracle SQL. I assume, something here is an Oracle keyword, but can't find it. Tried changing "max" and "master" - same error.
SELECT
id AS "ID",
imitation_mode AS "IMITATION_MODE",
time_begin AS "TIME_BEGIN",
time_end AS "TIME_END",
max(time_begin) AS "MAX_TIME_BEGIN"
FROM ssp_car_flow_master_plan master
INNER JOIN (SELECT max(time_begin) FROM ssp_car_flow_master_plan) AS max
ON master.time_begin = max
GROUP BY imitation_mode, time_begin, time_end, id