Re: GROUP by finish&&last day of month - Mailing list pgsql-sql

From Patrick Jacquot
Subject Re: GROUP by finish&&last day of month
Date
Msg-id 39634DA2.B1665F0C@anpe.fr
Whole thread Raw
In response to GROUP by finish&&last day of month  (Antti Linno <alligator@all.ee>)
List 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 by date:

Previous
From: "tjk@tksoft.com"
Date:
Subject: Re: GROUP by finish&&last day of month
Next
From: "Kermani, Bahram"
Date:
Subject: Median