On Fri, 28 Jan 2005 08:34:27 -0800, Joe Conway <[EMAIL PROTECTED]> wrote: > Alexandre Leclerc wrote: > >>>>>Here a normal listing of design.product_department_time: > >>>>> product_id | department_id | req_time > >>>>>------------+---------------+---------- > >>>>> 906 | A | 3000 > >>>>> 906 | C | 3000 > >>>>> 906 | D | 1935 > >>>>> 907 | A | 1500 > >>>>> 907 | C | 1500 > >>>>> 907 | D | 4575 > >>>>> 924 | A | 6000 > >>>>> 924 | C | 1575 > > Sorry for jumping in on this thread so late -- I haven't been able to > keep up with the lists lately. > > If I understand what you want correctly, you should be able to use > crosstab from contrib/tablefunc:
I'm a little bit confused on how to install this contirb. I know my contrib package is installed, but I don't know how to make it work in postgresql. (Using 7.4.5-1mdk on Mandrake Linux.) -- Alexandre Leclerc ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match