Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2. SQL (30 Pts) Based on the following DB: Performers (name, genre) Nominations

ID: 3738886 • Letter: 2

Question

2. SQL (30 Pts) Based on the following DB: Performers (name, genre) Nominations (name, category, year, is_winner) Grammy Nominations genre year Rlock Arizona Shakes Artist Amy WinehouseR&B; Arizona Shakes Frank Ocean The Black Keys 201 201 2013 2013 2013 Rock Perlormance Rlock Frank Ocean of the Year A&B; Frank Ocean Coldplay Rock Album of the Year Rock Perlormance Rock Performance Coldplay 201 The Black Keys 2013 yes 1) What is the output? (4 Pts) select year from E GrammyNominations where name 'Coldplay' and year not in (select year from E GrammyNominations where name- 'Coldplay' and is _winner-yes);

Explanation / Answer

In any Query the sub-query will first triggered. In this case the below sub-query will  

select year from E_Grammy_Nominations where name='Coldplay' and is_winner='yes') which give you the following year as resultset : 2009

Now your query becomes

select year from E_Grammy_Nominations where name='Coldplay' and year NOT IN ( 2009)

The resultset for this final query will be : 2013, 2012

Final O/P

2013 2012
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote