I hope someone on the list can suggest a solution for me - given a table like
CREATE TABLE EVENTS( stamp date, id varchar(16), event varchar(128) );
I'm trying to find the average age of the records. I've gotten as far as:
SELECT DISTINCT ON(id) age(stamp) FROM EVENTS;
Now, I need the
Michael Blakeley [EMAIL PROTECTED] writes:
I'm trying to find the average age of the records. I've gotten as far as:
SELECT DISTINCT ON(id) age(stamp) FROM EVENTS;
Now, I need the DISTINCT ON(id), but that means I can't simply avg() the age:
ERROR: Attribute events.id must be
* Michael Blakeley [EMAIL PROTECTED] [000601 19:09] wrote:
I hope someone on the list can suggest a solution for me - given a table like
CREATE TABLE EVENTS( stamp date, id varchar(16), event varchar(128) );
I'm trying to find the average age of the records. I've gotten as far as:
At 10:21 PM -0500 6/1/2000, Ed Loehr wrote:
Michael Blakeley wrote:
CREATE TABLE EVENTS( stamp date, id varchar(16), event varchar(128) );
I'm trying to find the average age of the records. I've gotten as far as:
SELECT DISTINCT ON(id) age(stamp) FROM EVENTS;
Now, I need the