Skip site navigation (1) Skip section navigation (2)

Re: SQL Question: Averages of intervals.

From: "Daniel Staal" <DStaal(at)usa(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: SQL Question: Averages of intervals.
Date: 2009-01-26 19:18:20
Message-ID: 20235.152.121.16.49.1232997500.squirrel@www.magehandbook.com (view raw or flat)
Thread:
Lists: pgsql-novice
On Sat, January 24, 2009 8:05 pm, Jasen Betts wrote:

> 10 minutes is 600 seconds
>
> SELECT AVG("IOW"),AVG("SYS"),AVG("USR"),MIN("Time"),"MachineName"
>   FROM "LoadTable"
>   WHERE "Date"='today'::date
>   GROUP BY  FLOOR( EXTRACT(EPOCH FROM "Time") / 600 ),"MachineName";

This worked perfectly.  Thank you.

Daniel T. Staal



pgsql-novice by date

Next:From: LukasDate: 2009-01-26 20:48:08
Subject: IN vs =
Previous:From: Guido BarosioDate: 2009-01-25 07:05:04
Subject: Re: postgres.exe 100% CPU but no I/O

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group