Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

syntax warning about group by

ANNECMay 29 2015 — edited Oct 20 2017

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,

This post has been answered by Gary Graham-Oracle on May 29 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 26 2015
Added on May 29 2015
5 comments
3,025 views