...

/

Solution Review: Managing the Output in SQL

Solution Review: Managing the Output in SQL

See a detailed analysis of the solution to the "Managing the Output in SQL" challenge.

We'll cover the following...

Solution

The solution for the challenge is given below. Click the “Run” button in the following widget and see the output of the code.

/***************************************************/
/*****              The query to               *****/
/*****      retrieve the albums along with     *****/
/*****      the size using business logic      *****/
/***************************************************/
  select album.title as album, SUM(bytes) as size
    from track
         join album using(albumid)
group by album.title 
  having SUM(bytes) < 2000000;
/***************************************************/
Retrieve the albums with their size

Explanation

Here is the explanation of the solution to the ...