From: | percy <pdeleon(at)punkass(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | questions on crosstab/coss-referenced queries |
Date: | 2004-05-26 08:16:33 |
Message-ID: | 200405260816.i4Q8GXLG021194@mx.inq7.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
hi list,
i have a table that is laid out like this:
student_id | tally | org_id
--------------+------------------
1 | 0 | 1
2 | 0 | 1
3 | 0 | 1
4 | 0 | 1
5 | 0 | 1
1 |8367220 | 2
3 |7561391 | 2
5 |2207271 | 2
4 |1280995 | 2
2 |1265355 | 2
and i want to lay the table like this:
student_id | 1 | 2
--------------+--------+--------
1 | 0 | 8367220
2 | 0 | 1265355
3 | 0 | 7561391
4 | 0 | 1280995
5 | 0 | 2207271
does postgres got a tool for queries like cross referencing/
crosstabs?
thanks,
percy
From | Date | Subject | |
---|---|---|---|
Next Message | Nabil Sayegh | 2004-05-26 11:03:43 | Re: questions on crosstab/coss-referenced queries |
Previous Message | Michael Guerin | 2004-05-26 04:36:41 | Re: error during vacuum |