tablas cruzadas
Publicado por magunche (1 intervención) el 16/04/2014 22:37:39
select * from crosstab('select date::text, type::text,
value::numeric(16,2) from tableA
where
type in (1,2) and date between ''2012-02-06'' and ''2013-02-13''
ORDER by 1,2' )
AS ct(date text,type1 numeric(16,2), type2 numeric(16,2))
value::numeric(16,2) from tableA
where
type in (1,2) and date between ''2012-02-06'' and ''2013-02-13''
ORDER by 1,2' )
AS ct(date text,type1 numeric(16,2), type2 numeric(16,2))
Valora esta pregunta


0