Received: from zukerman-1.dsl.speakeasy.net (zukerman-1.dsl.speakeasy.net [216.254.75.142]) by hub.org (8.10.1/8.10.1) with ESMTP id e72DfrG42391 for ; Wed, 2 Aug 2000 09:41:53 -0400 (EDT) Received: from (matt.w80.math-hat.com) [216.254.75.141] by zukerman-1.dsl.speakeasy.net with esmtp (Exim 3.12 #1 (Debian)) id 13JylW-0004Rx-00; Wed, 02 Aug 2000 09:40:58 -0400 Received: from zukerman by matt.w80.math-hat.com with local (Exim 3.12 #1 (Debian)) id 13JymO-00036H-00 for ; Wed, 02 Aug 2000 09:41:52 -0400 To: pgsql-sql@postgresql.org Subject: Time Aggregates From: Itai Zukerman Date: 02 Aug 2000 09:41:52 -0400 Message-ID: <87ittju6e7.fsf@matt.w80.math-hat.com> Lines: 14 User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Archive-Number: 200008/9 Hi, I'm currently doing this: SELECT symbol, date_trunc('minute', posted), min(price), max(price), avg(price) FROM trade GROUP BY symbol, date_trunc('minute', posted); to get a list of minute-averages of trade prices. I get the feeling that this is bad form, that I should be doing this some other way. Is that the case? -itai