Re: aggregate and order by

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: aggregate and order by
Date: 2007-12-07 11:46:27
Message-ID: 20071207114627.GM1955@frubble.xen.chris-lamb.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2007-12-07 11:56:01 Re: Nested loop in simple query taking long time
Previous Message Glyn Astill 2007-12-07 09:30:59 Re: Replication Monitoring