Re: How to get single raws for sums in a summary table?

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>, nasr(dot)laili(at)tin(dot)it, pgsql-novice(at)postgresql(dot)org
Subject: Re: How to get single raws for sums in a summary table?
Date: 2006-11-22 14:53:32
Message-ID: 109836.62283.qm@web31808.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Oops I tested this and didn't get what you wanted. try this instead.

>
> This is untested. Also I am not sure that this is what you want, but I do not know how you
> arrive
> at the values in your summary table.
>
> select
> distinct on (titolo)
^^^^^^
> 'any' as cod_rif,
> titolo,
> sum(quantity),
> cmf,
> u_qq,
> mont,
> vend,
> from
> test_t
> group by
> titolo,
> cmf,
> u_qq,
> mont,
> vend
> ;

Regards,
Richard Broersma Jr.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Ennio-Sr 2006-11-22 17:31:30 Re: How to get single raws for sums in a summary table?
Previous Message A. Kretschmer 2006-11-22 13:19:14 Re: How to get single raws for sums in a summary table?