Skip to content

Instantly share code, notes, and snippets.

View Vasile11416's full-sized avatar
๐Ÿ˜ƒ

Vasile Vasile11416

๐Ÿ˜ƒ
  • New York city
View GitHub Profile
/* How many albums does the artist Led Zepplin have? */
SELECT COUNT(Albumid) AS totalAlbums
FROM albums
WHERE Artistid = (SELECT Artistid FROM artists WHERE name = 'Led Zeppelin')
/* Create a list of album titles and the unit prices for the artist Audioslave */
SELECT n.Name, u.UnitPrice
FROM ((albums t INNER JOIN artists n
ON t.Artistid = n.Artistid)
INNER JOIN tracks u ON t.Albumid = u.Albumid)