This query used to work in 21c:
select json_array(
(
select coalesce(
json_arrayagg(json_array(v0)),
json_array()
)
from (
select json_array('Hello', 'World') v0
from DUAL
) t
)
) v0
from DUAL
It used to produce this JSON:
[[[["Hello","World"]]]]
Starting with 23c (I'm using https://hub.docker.com/r/gvenzl/oracle-free),,) I'm now getting:
SQL Error [978] [42000]: ORA-00978: nested group function without GROUP BY
The workaround is to add a dummy GROUP BY clause:
select json_array(
(
select coalesce(
json_arrayagg(json_array(v0)),
json_array()
)
from (
select json_array('Hello', 'World') v0
from DUAL
) t
group by null
)
) v0
from DUAL