diff --git a/README.md b/README.md index d1621e2..195485f 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,8 @@ This table should be called `songs` and have four properties with these exact na After successfully creating the table copy the code from [data.sql](data.sql) into MySQL Workbench, and run it to populate all of the data for the rest of the exercises. If you do not encounter any errors, then your answer is most likely correct. +studied + ### 2. Select only the Names of all the Bands [Solution](solutions/2.sql) @@ -37,6 +39,8 @@ Change the name of the column the data returns to `Band Name` | Van Canto | | Dream Theater | +studied + ### 3. Select the Oldest Album [Solution](solutions/3.sql) @@ -46,6 +50,8 @@ Make sure to only return one result from this query, and that you are not return |----|------------------------|--------------|---------| | 5 | ...And Justice for All | 1988 | 2 | +studied + ### 4. Get all Bands that have Albums [Solution](solutions/4.sql) @@ -62,6 +68,8 @@ Return the band name as `Band Name`. | Death | | Van Canto | +studied + ### 5. Get all Bands that have No Albums [Solution](solutions/5.sql) @@ -73,6 +81,8 @@ Return the band name as `Band Name`. |---------------| | Dream Theater | +studied + ### 6. Get the Longest Album [Solution](solutions/6.sql) @@ -84,6 +94,8 @@ Return the album name as `Name`, the album release year as `Release Year`, and t |----------------|--------------|-------------------| | Death Magnetic | 2008 | 74.76666593551636 | +studied + ### 7. Update the Release Year of the Album with no Release Year [Solution](solutions/7.sql) @@ -91,16 +103,22 @@ Set the release year to 1986. You may run into an error if you try to update the release year by using `release_year IS NULL` in the WHERE statement of your UPDATE. This is because MySQL Workbench by default will not let you update a table that has a primary key without using the primary key in the UPDATE statement. This is a good thing since you almost never want to update rows without using the primary key, so to get around this error make sure to use the primary key of the row you want to update in the WHERE of the UPDATE statement. +studied + ### 8. Insert a record for your favorite Band and one of their Albums [Solution](solutions/8.sql) If you performed this correctly you should be able to now see that band and album in your tables. +studied + ### 9. Delete the Band and Album you added in #8 [Solution](solutions/9.sql) The order of how you delete the records is important since album has a foreign key to band. +studied + ### 10. Get the Average Length of all Songs [Solution](solutions/10.sql) @@ -110,6 +128,7 @@ Return the average length as `Average Song Duration`. |-----------------------| | 5.352472513259112 | +studied ### 11. Select the longest Song off each Album [Solution](solutions/11.sql) @@ -137,6 +156,8 @@ Return the album name as `Album`, the album release year as `Release Year`, and | Break the Silence | 2011 | 6.15 | | Tribe of Force | 2010 | 8.38333 | +studied + ### 12. Get the number of Songs for each Band [Solution](solutions/12.sql) @@ -152,3 +173,5 @@ Return the band name as `Band`, the number of songs as `Number of Songs`. | Within Temptation | 30 | | Death | 27 | | Van Canto | 32 | + +studied