> 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