WebJan 1, 2024 · --Q1) Using a subquery, find the names of all the tracks for the--album "Californication". SELECT Name, AlbumID: FROM Tracks: WHERE AlbumId IN (SELECT AlbumId: FROM Albums: WHERE Title = … Web1. How many albums does the artist Led Zeppelin have? select count (*) from (select * from artists left join albums on artists.ArtistId=albums.ArtistId) where Name="Led Zeppelin"; 2. Create a list of album titles and the unit prices for the artist "Audioslave". How many records are returned? select a.UnitPrice,b.Title,b.Name
Coursera-SQL-for-Data-Science-Answers/Module 3 Practice Quiz - Github
WebSELECT CustomerId, COUNT (*) AS OrdersFROM InvoicesGROUP BY CustomerId ORDER BY Orders DESC -------------------------------------------------------------------------------- ---- --Q9) Find the albums with 12 or more tracks. SELECT AlbumId, Count (*) AS NtracksFROM Tracks GROUP BY AlbumIdHAVING COUNT (*) >= 12 End of preview. WebUsing the database: Write SQL queries for each of the questions below. 1)Find the albums that have more than 5 tracks. Print the Id, and the title of such album. Also print the number of tracks in each album. Number of rows returned in the result = 250. A) Modify the above query to output the number of albums that have more than 5 tracks. laughing hard emoji copy
SQL data science quiz 2.sql - -Q1 Find all the tracks that...
WebAug 1, 2024 · Having a simple database table structure for three tables; artist, album, tracks where the table album has a foreign key, named artist_id, to a field named id in … WebSelect bandName from bands, albums, songs where songs.length= (select max(length) from songs) and songs.albumID=albums.albumID and albums.bandID=bands.bandID; … Web5. Find the name and ID of the artists who do not have albums. Code : select a.Title, ar.Name, ar.ArtistId from Artists ar left join Albums a on ar.ArtistId = a.ArtistId where a.Title is NULL; After running the query described above, two of the records returned have the same last name. Enter that name below. Answer : Gilberto . 6. laughing hand critical role