Search notes:

ORA-03048: SQL reserved word … is not syntactically valid following …

In 23c, the following SQL statement throws ORA-03048: SQL reserved word 'WHERE' is not syntactically valid following '...from dual group by dummy ':
select
   count(*),
   dummy
from
   dual
group by
   dummy
where
   dummy = 'X';
In Oracle versions prior to 23c, the same statement throws ORA-00933: SQL command not properly ended (see improved error messages)

See also

SQL's order of select operations
Other Oracle error messages such as ORA-03049: SQL keyword … is not syntactically valid following …

Index