On Sun, Nov 6, 2011 at 9:06 AM, Gabriel Filipiak wrote:
> I have problem with creating a pivot table in postgreSQL using crosstab
> function. It works well but it produces many records for the same
> client_id, how can I avoid it?
>
> Here is the SQL:
>
> SELECT * FROM crosstab('SELECT client_id,
I have problem with creating a pivot table in postgreSQL using crosstab
function. It works well but it produces many records for the same
client_id, how can I avoid it?
Here is the SQL:
SELECT * FROM crosstab('SELECT client_id,extract(year from date),
sum(amount) from orders group by extract(
ye