...

/

Solution Review: Implement Business Logic

Solution Review: Implement Business Logic

See a detailed analysis of the solution to the "Implement Business Logic" 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)
   where track.albumid = 7
group by album.title;
/***************************************************/
Code to calculate storage size

Explanation

Following is the explanation of the challenge:

...