Exercises
All exercises here concern the music database. You’ll find the table
structures in The Music Database” are a useful
reference, or you can practice using the SHOW statement as you work your way through
the tasks:
Use one or more
SELECTstatements to find out how many tracks are on New Order’s Brotherhood album.Using a join, list the albums that we own by the band New Order.
With
INSERTstatements, add the artistLeftfieldto the database. For this new artist, add the albumLeftismthat has the following tracks:Release the Pressure(Time: 7.39)Afro-Melt(Time: 7.33)Melt(Time: 5.21)Song of Life(Time: 6.55)Original(Time: 6.00)Black Flute(Time: 3.46)Space Shanty(Time: 7.15)Inspection Check One(Time: 6.30)Storm 3000(Time: 5.44)Open Up(Time: 6.52)21st Century Poem(Time: 5.42)Bonus Track(Time: 1.22)
How long in minutes is the
Leftismalbum you added in Question 3? Hint: use theSUM()aggregate function.Change the time for the
Originaltrack on theLeftismalbum to 6.22.Remove the
Bonus Trackfrom theLeftismalbum.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access