X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.225.181]) by svr1.postgresql.org (Postfix) with ESMTP id 79562CC3C6 for ; Tue, 15 Jul 2003 15:40:34 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr5.postgresql.org [64.117.225.181]) (amavisd-new, port 10024) with ESMTP id 39823-06 for ; Tue, 15 Jul 2003 15:40:52 +0000 (GMT) Received: from biglumber.com (biglumber.com [207.228.252.42]) by svr1.postgresql.org (Postfix) with SMTP id BFC4FCC40F for ; Tue, 15 Jul 2003 12:40:22 -0300 (ADT) Received: (qmail 13672 invoked from network); 15 Jul 2003 15:40:52 -0000 Received: from biglumber.com (HELO localhost) (207.228.252.42) by 0 with SMTP; 15 Jul 2003 15:40:52 -0000 From: greg@turnstep.com To: pgsql-sql@postgresql.org Cc: dmitry@openratings.com Cc: dmitry@openratings.com Subject: Re: Count dates distinct within an interval X-PGP-Key: 2529 DF6A B8F7 9407 E944 45B4 BC9B 9067 1496 4AC8 X-Request-PGP: http://www.biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 In-Reply-To: <3F1410CB.9020504@openratings.com> Date: Tue, 15 Jul 2003 15:40:52 -0000 X-Mailer: JoyMail 1.37 Message-ID: X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/185 X-Sequence-Number: 14299 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > Also, I could certainly write a simple function, that would get all the > entries in order, and scan through them, counting according to my rules... > But I was hoping to find some way to do this in plain sql though... In this example, you are best off using a function. - -- Greg Sabino Mullane greg@turnstep.com PGP Key: 0x14964AC8 200307151137 -----BEGIN PGP SIGNATURE----- Comment: http://www.turnstep.com/pgp.html iD8DBQE/FCAgvJuQZxSWSsgRAg1jAJ9kS9PpIiMkij6TtOg63O59TeezPACgzhMF ZM/84SEPP4doDR8fsGpnUBU= =w5Wa -----END PGP SIGNATURE-----