I have a table in PostgreSQL, something like this:
ID NAME
450 China
525 Germany
658 Austria
I’d like to query every names where ID < 500 and at the same time where ID > 500 and retrieve the result in two columns using
array_to_string(array_agg(NAME), ', ').
I need the following result:
column1 (ID < 500) column2 (ID > 500)
China Germany, Austria
