USE classdb; 1. Write a select statement that uses a subquery that is equivalent to this Join
Fantastic news! We've Found the answer you've been seeking!
Question:
1. Write a select statement that uses a subquery that is equivalent to this Join query:
-- SELECT t.name, t.unitprice
-- FROM track t JOIN playlisttrack pl using(trackId)
-- WHERE playlistId = 16;
2. Write a select statement that uses a subquery to display the track name and composer for all tracks that are on an album with the artistID = 22;
3. Write a select statement that uses a subquery to display the name from the track table of any tracks that do not have any sales (i.e. are not in the invoiceline table)
4. Write a select statement that uses a subquery to display the name and unitprice of all tracks that have a unitprice greater than the average track unitprice.
5. Write a select statement that uses a subquery to display the name of any track that is longer (milliseconds) than the average milliseconds for tracks with albumId=59
6. Write a select statement that uses a subquery to display the name and unitprice of all tracks that have a unitprice higher than any track in genreid 4
7. Use the EXISTS operator to display the name and unitprice of all tracks that have a row in the invoiceline table.
Related Book For
Data Modeling and Database Design
ISBN: 978-1285085258
2nd edition
Authors: Narayan S. Umanath, Richard W. Scammel
Posted Date: