Re: aggregate and order by - Mailing list pgsql-general

From Sam Mason
Subject Re: aggregate and order by
Date
Msg-id 20071207114627.GM1955@frubble.xen.chris-lamb.co.uk
Whole thread Raw
In response to aggregate and order by  ("Matthew Dennis" <mdennis@merfer.net>)
List pgsql-general
On Thu, Dec 06, 2007 at 02:12:48PM -0600, Matthew Dennis wrote:
> I want to create an aggregate that will give the average velocity (sum of
> distance traveled / sum of elapsed time) from position and timestamps.

How do you want to handle noisy data?  If you want to handle it in any
reasonable way you'd need to some sort of regression; i.e. you'd need
to consider all the relavant data and then try and minimise the total
error somehow.  I've always relied on external tools to do this sort of
thing, but if you want to do it in the database you may be able to get
somewhere with pl/r.


  Sam

pgsql-general by date:

Previous
From: Glyn Astill
Date:
Subject: Re: Replication Monitoring
Next
From: Alvaro Herrera
Date:
Subject: Re: Nested loop in simple query taking long time