By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
SQL> select f.role from filmography 2 , 3 (select max(awards) as maxiawards,username from filmography 4 group by username)maxawards 5 where f.role=maxawards.role 6 and filmography.awards=maxawards.maxiawards; where f.role=maxawards.role * ERROR at line 5: ORA-00904: "MAXAWARDS"."ROLE": invalid identifier
(select max(awards) as maxiawards,username from filmography group by username)maxawardscYour MAXAWARDSC view only contains the MAXIAWARDS and USERNAME columns. Yet in line 5, you are looking for the ROLE column of this view. Since this column does not exist, you get the error. You'll have to include the ROLE column in the inline view.
Dig Deeper on Oracle and SQL
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.