Re: GROUP by finish&&last day of month

Поиск
Список
Период
Сортировка
От Patrick Jacquot
Тема Re: GROUP by finish&&last day of month
Дата
Msg-id 39634DA2.B1665F0C@anpe.fr
обсуждение исходный текст
Ответ на GROUP by finish&&last day of month  (Antti Linno <alligator@all.ee>)
Список pgsql-sql
Antti Linno wrote:

> Ok, if I want to get non-aggregat data in groups, I use order by. This
> group by seemed so logical though, but the fruit that u can't have, is
> usually the most sweet.
>
> New question, how to get the last day of month(order data by last day of
> month). And to prevent chain letter from misunderstanding, no I don't
> intend to look it up from calendar and then input it manually.
>
> A.

to get last day of month :
1) use date-trunc to truncate to first day of month
2) add one month
3) substract 1 day



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

Предыдущее
От: "tjk@tksoft.com"
Дата:
Сообщение: Re: GROUP by finish&&last day of month
Следующее
От: "Kermani, Bahram"
Дата:
Сообщение: Median