select
*
from
(
select
rating,
avg(age) as avgage
from
sailors
group by
rating
) as temp
where
temp.avgage = (
select
min(temp.avgage)
from
temp
);
When i am trying to run the above command i am getting the following error
ORA-00933: SQL command not properly ended
The Sailors table looks like this Sailors Table
Could you tell why i am getting this error?