Re: Difference between Access97 and PostgreSQL - Mailing list pgsql-sql

From Christopher Kings-Lynne
Subject Re: Difference between Access97 and PostgreSQL
Date
Msg-id GNELIHDDFBOCMGBFGEFOKEDPCBAA.chriskl@familyhealth.com.au
Whole thread Raw
In response to Re: Difference between Access97 and PostgreSQL  (Roberto Mello <rmello@cc.usu.edu>)
List pgsql-sql
> On Wed, Jan 30, 2002 at 11:54:56PM +0000, Yan Bai wrote:
> > 
> > --------------------------------------------------
> > SELECT temp.rating, temp.avgage
> > FROM (SELECT s.rating, AVG(s.age) as avgage
> >      FROM sailors s GROUP BY s.rating) as temp
> 
> Have you tried this query without the subselect? It looks like it should
> work.

What about this?

SELECT temp.rating, temp.avgage
FROM (SELECT s.rating, AVG(s.age) as avgage    FROM sailors s GROUP BY s.rating, s.age) as temp

Chris



pgsql-sql by date:

Previous
From: "Josh Berkus"
Date:
Subject: Re: How to merge several attributes and Delete an
Next
From: "Henshall, Stuart - WCP"
Date:
Subject: Re: Difference between Access97 and PostgreSQL