Skip to content
Advertisement

How can I select a nested json object with a group by clause in oracle sql from a table?

Let’s say I have the following statement:

My desired output looks like this:

How do I get this output with a select statement?

Thank you very much for your help!

Advertisement

Answer

JSON_OBJECT() and JSON_OBJECTAGG() functions might be used with proper grouping such as

Demo

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement