Re: Data format and display

From: Josué Maldonado <josue(at)lamundial(dot)hn>
To: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
Cc: pgsql general list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Data format and display
Date: 2005-01-20 23:19:21
Message-ID: 41F03C79.4080406@lamundial.hn
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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."

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Steve Crawford 2005-01-20 23:20:31 Re: Data format and display
Previous Message Josué Maldonado 2005-01-20 22:49:56 Data format and display