Here are some relations that exist in a database for a symphony.
Person(email, name, age)
• This relation stores anyone who has signed up for our mailing list. Tuples in this relation
may not be listed in Purchase.
Show(id, year, month, date, showing, attendanceNumber)
• Showing describes whether a show was during morning, afternoon, or evening
Song(composer, title)
SongsPerformed(showID, composer, title)
• showID is a foreign key referring to Show
• composer and title are foreign keys referring to attributes of the same name in Song
Purchase(email, showID, price)
• email is a foreign key referring to the email attribute in Person
• showID is a foreign key referring to Show
Musician(id, name, instrument, position, nationality)
PerformedIn(id, showID)
• id refers to the attribute of the same name in Musician
• showID is a foreign key referring to Show
Write SQL statements to answer the following questions:
1. Find the email addresses of people who attended a show in January 2019.
Do you need DISTINCT? Why or why not?
2. Find the year, month, date, and attendance numbers of all shows that had a Canadian
musician perform in it.
3. Find the names of all musicians who play the flute.
Do you need DISTINCT? Why or why not?
Page 1 of 1