Exercise

Ultimate Power

Sometimes you might want to 'save' the results of a query so you can do some more work with the data. You can do that by creating a temporary table that remains in the database until SQL Server is restarted. In this final exercise, you'll select the longest track from every album and add that into a temporary table which you'll create as part of the query.

Instructions

100 XP
  • Insert data via a SELECT statement into a temporary table called #maxtracks.
  • Join album to artist using artist_id, and track to album using album_id.
  • Run the final SELECT statement to retrieve all the columns from your new table.