|
-
Simple GROUP BY clause... error?
I am sure there is a simple reason why I am getting errors. I have used GROUP BY statements before and not had this problem. So there must be something small that is wrong with my syntax that I can't figure out (I'm currently going through the SQL cookbook trying to find out what I've done wrong!)
Here is my script:
SELECT a.plot_numbe, a.age_of_tre, a.sample_yea, a.species_co, a.total_heig, b.species_ty FROM
all_tree_2008 a
INNER JOIN a3a_species b on a.species_co=b.species_co
WHERE a.age_of_tre IS NOT NULL AND a.total_heig > 12 AND b.species_ty='S'
ORDER BY sample_yea, plot_numbe;
I would like to add in a 'GROUP BY a.plot_numbe' in there somewhere but no matter where I put it in the script I get an error. Things like "statement ended properly" or "not a GROUP BY expression".
Any ideas would be greatly appreciated!
Thanks in advance,
Ladygray
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|