Received: from as.tksoft.com (gyw.com [209.55.67.177] (may be forged)) by hub.org (8.10.1/8.10.1) with ESMTP id e65D0SS28820 for ; Wed, 5 Jul 2000 09:00:29 -0400 (EDT) Received: (from tjk@tksoft.com) by uno.tksoft.com (8.8.8/8.8.8) id GAA30177; Wed, 5 Jul 2000 06:00:35 -0700 From: "tjk@tksoft.com" Message-Id: <200007051300.GAA30177@uno.tksoft.com> Subject: Re: GROUP by finish&&last day of month To: alligator@all.ee (Antti Linno) Date: Wed, 5 Jul 2000 06:00:35 -0700 (PDT) Cc: pgsql-sql@postgresql.org In-Reply-To: from "Antti Linno" at Jul 5, 0 03:32:53 pm Content-Type: text X-Archive-Number: 200007/41 Not quite sure what you mean, but how about this: select date_part('day', 'Jul 01 00:00:00 2000 PDT'::datetime-1); You must specify Jul for June, i.e. always the following month. You could get around that too, but since I don't know why you need to do what you asked, I'll leave it at this. Troy > > 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. > > >