| От | Christoph Haller |
|---|---|
| Тема | Re: columnar format |
| Дата | |
| Msg-id | 3F0A8481.D9F01154@rodos.fzk.de обсуждение |
| Ответ на | columnar format ("Don Soledad" <avsoledadjr@hotmail.com>) |
| Список | pgsql-sql |
> > i would like to ask for the sql statement to the output: > > ITEM DESC Jan Feb Mar Apr ... Sep Total > xxxxxxxxxx 999 999 999 999 ... 999 9,999 > > where "Jan" column is sum of all "x" items purchased on Jan, "Feb" column as > sum of Feb purchases, and so on up to "Sep", and "Total" as the total from > "Jan" to "Sep" (as in the case here). the numbers may/may not be formatted, > and the period varies, depending on the range. > Search the archives for pivot tables resp. crosstab and/or have a look at $PGSQLD/contrib/tablefunc/README.tablefunc Regards, Christoph
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера