Hiya!
I am writing a query to group by a particular set of attributes and order by another set of attributes.
What I want is an alphabetical list of species name, but grouped into the species family.
i.e.
Duck
--------
Garganey
Goosander
Woodduck
Swan
-----------
Bewick Swan
Whooper
My query is:-
I get the error:-
ORA-00979: not a GROUP BY expression
Could someone explain this error to me in lamens?
I have had trouble with group by/order by and do not fully understand it.....could anyone explain this to me in lamens also?
Cheers!
Trulfa
I am writing a query to group by a particular set of attributes and order by another set of attributes.
What I want is an alphabetical list of species name, but grouped into the species family.
i.e.
Duck
--------
Garganey
Goosander
Woodduck
Swan
-----------
Bewick Swan
Whooper
My query is:-
Code:
SELECT DISTINCT SIGHTING.SPECIES#, SPECIES.NAME, SPECIES.FAMILY
FROM SIGHTING, SPECIES
WHERE SIGHTING.SPECIES# = SPECIES.SPECIES#
GROUP BY SPECIES.FAMILY
ORDER BY SPECIES.NAME;
I get the error:-
ORA-00979: not a GROUP BY expression
Could someone explain this error to me in lamens?
I have had trouble with group by/order by and do not fully understand it.....could anyone explain this to me in lamens also?
Cheers!
Trulfa