SQL (30 Pts) Based on the following DB: 2. Performers Cname, genre Nominations (
ID: 3738884 • Letter: S
Question
SQL (30 Pts) Based on the following DB: 2. Performers Cname, genre Nominations (name, category, year, is winner) Performers Grammy_ Nominations category year is winner Rock H&B; Flock A&B; Rock Arizona Shakes Arizona Shakes Frank Ocean Frank Ocean 2013 2013 2013 2013 2013 no Rock Performance Arizona Shakes Frank Ocean The Black Keys of the Year Rock Performance Rock Album of the Year Rock Performance Rock Pertormance 2012 2013 The Black Keys 1) Write a SQL query to find out how many time each performer got nominated. Please order the results by name descendingly. (4 Pts) NAME COUNT(*) 1 The Black Keys 2 Frank Ocean 3 Coldplay 4 Arizona Shakes 4Explanation / Answer
Ans:
select performer.name,COUNT(*) from performer
inner join [Grammy_ Nominations]on performer.name= [Grammy_ Nominations].name
group by performer.name
order by count(*) desc;
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.