** I have been using the Chinook Database with SQLite to learn some SQL. The goal is to create a list of album titles and the unit prices for the artist "Audioslave". The "strong text" link will show the Chinook Database that I have been using to run this query.**
I have attempted to run this query using the concept of subqueries and I keep getting an error saying: near "SELECT": syntax error.
Here is the code that I have so far.
SELECT UnitPrice
FROM tracks
Where AlbumID IN
SELECT AlbumID
FROM Albums
Where AlbumID IN (SELECT Name
FROM artists
Where Name = 'Audioslave');
Any response would be appreciated :)
CodePudding user response:
I think you are missing () after IN
SELECT UnitPrice
FROM tracks
Where AlbumID IN
( SELECT AlbumID
FROM Albums
Where AlbumID IN (SELECT Name
FROM artists
Where Name = 'Audioslave'));