X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (mx2.hub.org [200.46.204.254]) by postgresql.org (Postfix) with ESMTP id AD50911F670C for ; Mon, 17 Apr 2006 16:57:02 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: -2.593 X-Spam-Level: X-Spam-Status: No, score=-2.593 required=5 tests=[AWL=0.006, BAYES_00=-2.599] Received: from postgresql.org ([200.46.204.71]) by localhost (mx2.hub.org [200.46.204.254]) (amavisd-new, port 10024) with ESMTP id m9ZAG21nO4w4 for ; Mon, 17 Apr 2006 16:56:55 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from wolff.to (wolff.to [66.93.197.194]) by postgresql.org (Postfix) with SMTP id BC68011F66F8 for ; Mon, 17 Apr 2006 16:56:53 -0300 (ADT) Received: (qmail 29016 invoked by uid 500); 17 Apr 2006 19:59:25 -0000 Date: Mon, 17 Apr 2006 14:59:25 -0500 From: Bruno Wolff III To: Timo Tuomi Cc: pgsql-sql@postgresql.org Subject: Re: Please help with a query.. Message-ID: <20060417195925.GA28828@wolff.to> Mail-Followup-To: Bruno Wolff III , Timo Tuomi , pgsql-sql@postgresql.org References: <1144748062.471716.171260@u72g2000cwu.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1144748062.471716.171260@u72g2000cwu.googlegroups.com> User-Agent: Mutt/1.4.2.1i X-Archive-Number: 200604/106 X-Sequence-Number: 24915 On Tue, Apr 11, 2006 at 02:34:22 -0700, Timo Tuomi wrote: > > I'd need to get the time interval X-Y-Z on each date but I cannot rely > on the date (can't make any joins based on the date part of > timestamps). Instead I'd need to find out X-Y and Y-Z pairs with a > minimal "stop" -time at Y and calculate total travel time for those. If possible you should change your design, so that you can identify a route.