Archive for May 2nd, 2009
GROUP_CONCAT in PostgreSQL without aggregate functions
In one of the previous articles:
, I described an aggregate function to concatenate strings in PostgreSQL, similar to GROUP_CONCAT
in MySQL
.
It's very useful if you have a complex GROUP BY
query with multiple conditions.
But for some simple queries it's possible to emulate GROUP_CONCAT
with pure SQL
, avoiding custom functions at all.
Let's create a table to demonstrate our task:
Read the rest of this entry »