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 Cname, genre) Nominations

ID: 3739554 • Letter: 2

Question

2. SQL (30 Pts) Based on the following DB: Performers Cname, genre) Nominations (name, category, year, is_winner) Performers Grammy_Nominations genre Rock R&B; Rock R&B; Rock category New Artist Rock Performance Album of the Year name name year is_winner Coldplay Arizona Shakes Arizona Shakes Frank Ocean Frank Ocean 2013 2013 2013 2013 2013 2009 2009 2012 2013 no no Arizona Shakes Frank Ocean The Black Keys Rock Performance Rock Album Alburm of the Year Rock Performance Rock Performance no no no The Black Keys 1) Write a SQL query to display Performers table. (3 Pts) NAME GENRE 1 Coldplay 2 Amy Winehouse RnB 3 Arizona Shakes Rock 4 Frank Ocean nB 5 The Black Keys Rock Rock 2) Write a SQL query to list all unique genres. (3 Pts) GENRE 1 RnB 2 Rock

Explanation / Answer

Q1

Select name,genre from Performers

Q2

Select distinct genre from Performers

Q3

Select name as Performer,category from Grammy_Nominations where year between 2012 and 2013

Q4

Select name,category from Grammy_Nominations where is_winner="no"

Q5

Select Count(category) from Grammy_Nominations where category="Rock Performance"

Q6

Select name,count(name) from Grammy_Nominations order by name desc group by(name)

Q7

This query will output the table containing the winners of year 2013

Which are

Frank Ocean R&B

Black Keys Rock

Q8

This will output the years where coldplay is nominated but has not won

2013

2009

2012

Do give a thumbs up

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