SQL There are lazy artists in Chinook artists that are not

SQL

There are \"lazy\" artists in Chinook - artists that are not associated with any albums. Write a query to produce a list of these artists, sorted by artist name (alphabetically). The result set should have a single column titled lazy_artist. The figure below provides the first 10 rows of the result set; there are 71 in total. Your query must not hardcode any numeric ids (e.g. ArtistId, AlbumId). Your query must have subquery for full points

Album Artist Albumld Artistld Title Name L Artist ld PlaylistTrack Playlist playlistId stid Trackld Name Employee n Employ eeld e-m Customer Last Name CustomerId First Name FirstName Title LastName ReportsTo Com BirthDate Address HireDate City Address State City Country State PostalCode Country Phone PostalCode Fax Phone Email Fax Email supportRepld Track Trackld Name Albumld MediaTypeld Genreld Composer Milliseconds Bytes Unit Price Invoice Line Invoice Lineld nvoiceld Trackld UnitPrice Quantity Invoice Invoice Id L customer ld Invoice Date Billing Address BillingCity Billingstate BillingCountry Billing PostalCode Total Media Type Media T Name Genre Genreld Name

Solution

SELECT Name AS lazy_artist

FROM Artist

WHERE Artist_Id NOT IN (SELECT ArtistId FROM Album)

ORDER BY Name;

SQL There are \

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site