Re: How to get single raws for sums in a summary table?
| От | Richard Broersma Jr |
|---|---|
| Тема | Re: How to get single raws for sums in a summary table? |
| Дата | |
| Msg-id | 109836.62283.qm@web31808.mail.mud.yahoo.com обсуждение |
| Ответ на | Re: How to get single raws for sums in a summary table? (Richard Broersma Jr <rabroersma@yahoo.com>) |
| Ответы |
Re: How to get single raws for sums in a summary table?
Re: How to get single raws for sums in a summary table? |
| Список | 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 по дате отправления: