Skip to content
Advertisement

How to query this in raw SQL?

I have a table user with 2 columns, name and role. I want to group together for one role all the names which are associated with it.

So suppose for the role “admin” is used by 3 different names.

I want to start my query with this

Advertisement

Answer

listagg function should help. need to group the column containing “admin” then it will create a list of the names. basic syntax below.

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