Search Postgresql Archives

Re: Data format and display

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Steve,

El 20/01/2005 5:20 PM, Steve Crawford en su mensaje escribio:
select
zert_title as TITULO, sum(case when epr_mes=200309 then epr_valor else 0 end) as "200309",
sum(case when epr_mes=200310 then epr_valor else 0 end) as "200310",
sum(case when epr_mes=200311 then epr_valor else 0 end) as "200311",
sum(case when epr_mes=200312 then epr_valor else 0 end) as "200312"
group by 1;

That works ok, but start and end month are variables, user can choose them.

Thanks,


-- Sinceramente, Josué Maldonado.

"Los estupidos adolecentes son los que se reunen por las noches a consumir drogas y a planear los ilicitos."

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux