- artistId: the unique ID number assigned to this artist
- name: the name of this artist
- albumId: the unique ID number assigned to this album
- title: the title of this album
- artistId: the unique ID of the artist on this album
- trackId: the unique ID number assigned to this track
- name: the name of this track
- albumId: the unique ID of the album that this track is on
- mediaTypeId: don't worry about this!
- genreId: don't worry about this!
- composer: the composer of this track
- milliseconds: the length of this track in milliseconds
- bytes: the size of this track file in bytes
- unitPrice: the price of this track
So far, we haven't yet considered the artists table. What if we want to know how many albums each artist has released?
Create a SQL query to construct a table that contains the name of each artist along with how many albums that artist has released (that are in the albums table).
You should get the following output:
sqlite> SELECT * FROM album_count LIMIT 10; Aaron Copland & London Symphony Orchestra|1 Aaron Goldberg|1 Academy of St. Martin in the Fields & Sir Neville Marriner|1 Academy of St. Martin in the Fields Chamber Ensemble & Sir Neville Marriner|1 Academy of St. Martin in the Fields, John Birch, Sir Neville Marriner & Sylvia McNair|1 Academy of St. Martin in the Fields, Sir Neville Marriner & Thurston Dart|1 Accept|2 Adrian Leaper & Doreen de Feis|1 Aerosmith|1 CREATE TABLE album_count as select "REPLACE THIS LINE WITH YOUR SOLUTION";