problem - group by

Поиск
Список
Период
Сортировка
От Dusan PESL
Тема problem - group by
Дата
Msg-id 72.444-1127-73735402-1178958377@seznam.cz
обсуждение исходный текст
Ответы Re: problem - group by  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
Hello,

in SQLite this query is posible:

SELECT acount/1000, SUM(values)  FROM acounts
GROUP BY acount/1000

this very simple and elegant way to get groups of common acounts, Unfortunately Postgres doesn't alow "GROUP BY
acount/1000"- only "GROUP BY acount", which is not the same. 

I know, there are several ways, how to solve this problem, but the metod "GROUP BY acount/1000" seems to be the most
elegant.Can anyone help me? 

Thanks Dusan

В списке pgsql-novice по дате отправления:

Предыдущее
От: coder@montx.com
Дата:
Сообщение: Re: [NOVICE] aggregate function ?
Следующее
От: Dusan PESL
Дата:
Сообщение: problem - group by