Skip to content

Instantly share code, notes, and snippets.

@rachelwritingcode
Created August 14, 2017 03:01
Show Gist options
  • Save rachelwritingcode/728fc6840c57408e36de27a5f911470c to your computer and use it in GitHub Desktop.
Save rachelwritingcode/728fc6840c57408e36de27a5f911470c to your computer and use it in GitHub Desktop.
Column "Movie Title" format a35;
select "Movie Title"
from (select tm.MovieTitle as "Movie Title",
count(tad.MovieID) as "Total Awards"
from tblMovie tm
inner join tblAwardDetail tad on tm.MovieID = tad.MovieID
where tad.AwardResultID = '1'
group by tm.MovieTitle
order by "Total Awards" desc)
where ROWNUM = 1;
/*
Movie Title
-----------------------------------
Saving Private Ryan
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment