Additional Practice

Last modified: December 02, 2020

For practicing we will be using an online music store database. Here is the entity relationship diagram of the schema.

Feel free to explore the data by using SELECT * FROM [table name] in the SQL editor below:

Select Questions

Select all columns and rows from the albums table in the SQL box below:

Select all columns from the albums table where the album title is ‘Let There Be Rock’ in the SQL box below:

What are all the genres of the music in this database?

Join Questions

Join the Artist and the Album table with an inner join in the SQL box below:

Join the Artist and the Album table with an left join in the SQL box below:

Join the Artist and the Album table with an outer join in the SQL box below:

The INNER JOIN found every instance where the albums.artist_id equalled an artists.id and joined the data together to create a row in the final table.

The LEFT JOIN performed an INNER JOIN and then also added rows to the final table where the left table (albums) did not have matches.

The OUTER JOIN performed both an INNER and LEFT JOIN and then also added rows to the final table where the right table (artists) did not have matches.

How many Artists have more than 1 Album:

Common Errors Questions

Fix the following queries:

Written by: Matt David
Reviewed by: