Re: How to get single raws for sums in a summary table? - Mailing list pgsql-novice

From Richard Broersma Jr
Subject Re: How to get single raws for sums in a summary table?
Date
Msg-id 109836.62283.qm@web31808.mail.mud.yahoo.com
Whole thread Raw
In response to Re: How to get single raws for sums in a summary table?  (Richard Broersma Jr <rabroersma@yahoo.com>)
Responses Re: How to get single raws for sums in a summary table?  (Ennio-Sr <nasr.laili@tin.it>)
Re: How to get single raws for sums in a summary table?  (Ennio-Sr <nasr.laili@tin.it>)
List 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.

pgsql-novice by date:

Previous
From: Richard Broersma Jr
Date:
Subject: Re: How to get single raws for sums in a summary table?
Next
From: Ennio-Sr
Date:
Subject: Re: How to get single raws for sums in a summary table?