Consulta de tablas cruzadas (CROSS-TAB) en Oracle

kateerre
13 de Marzo del 2005
Hola a todos,

Tengo la siguiente tabla y quisiera realizar un imforme de referencias cruzadas (CROSS-TAB)

Tabla Facturation
year, month ,group ,promotion type import
2005, 1, 1, 1, 0, 23
2005, 1, 1, 1, 1, 20
2005, 1, 1, 1, 4, 10
2005, 1, 1, 2, 1, 11
2005, 1, 1, 2, 3, 55
2005, 1, 3, 2, 1, 22
2005, 1, 3, 2, 3, 15
2005, 1, 3, 2, 10, 1
2005, 1, 3, 3, 9, 2
2005, 2, 1, 1, 0, 45
2005, 2, 1, 1, 3, 10

La consulta en ACCESS para extraer la información que quiero seria la siguiente:

TRANSFORM Sum(facturation.import) AS Total_Import
SELECT facturation.year, facturation.month, facturation.group, facturation.promotion
FROM facturation
GROUP BY facturation.year, facturation.month, facturation.group, facturation.promotion
PIVOT facturation.import;


year, month, group, promotion, 0, 1, 3, 4, 9, 10
2005, 1, 1, 1, 23, 20, , 10, ,
2005, 1, 1, 2, , 11, 55, , ,
2005, 1, 3, 2, , 22, 15, , , 1
2005, 1, 3, 3, , , , , 2,
2005, 2, 1, 1, 45, , 10, , ,

Pero, alguien me podría explicar como seria la consulta en Oracle?

Muchas gracias

Kateerre
13 de Marzo del 2005
Perdón, la consulta en ACCES seria la siguiente:
TRANSFORM Sum(facturation.import) AS Total_Import
SELECT facturation.year, facturation.month, facturation.group, facturation.promotion
FROM facturation
GROUP BY facturation.year, facturation.month, facturation.group, facturation.promotion
PIVOT facturation.type;

Como se contruiria en Oracle?