Challenge: Managing the Output in SQL

Test your understanding of SQL by completing a challenge focused on managing the output.

Problem statement

Write a query to list all the records having less than 2,000,000 bytes (size) of an album. Compute an album’s storage size using the bytes column in the track table and apply the condition.

Here’s what the data in the track table looks like:

-[ RECORD 1 ]+--------------------------------------------------
trackid      | 1
name         | For Those About To Rock (We Salute You)
albumid      | 1
mediatypeid  | 1
genreid      | 1
composer     | Angus Young, Malcolm Young, Brian Johnson
milliseconds | 343719
bytes        | 11170334
unitprice    | 0.99

Get hands-on with 1200+ tech skills courses.