Our server is 11g2 verison.
In oracle sql developer version4, I tried to query. to find the mimium grade_level and its earlist entry date record of a student in high school.
Here is the query:
| SELECT |
| er.studentid, |
| MIN(er.grade_level ) MinimumGrade , |
| MIN(er.entrydate) earlistEntrydate |
| FROM |
| ps_enrollment er |
| |
| WHERE |
| er.grade_level BETWEEN 9 AND 12 |
I can run the query with no errors, but in the query window for syntax, It shows red in the select part of the query shows warning of syntax, it says something like : Select list inconsistent with Group by, amend Group by clause to
| er.studentid, MIN(er.grade_level, MIN(er.entrydate) |
Why is that?
Thanks,