Skip to content

Instantly share code, notes, and snippets.

View scwebd's full-sized avatar

Sarah Cullen scwebd

  • Denver, CO
View GitHub Profile
`tree 04-HandlebarsLunch -I "node_modules"`
*==== MySQL Resources: ========================*
*List of MySQL Data Types:* http://www.mysqltutorial.org/wp-content/uploads/0211/03/MySQL-Data-Types.jpg
*What the number actually means in INTEGER(number):* https://www.virendrachandak.com/techtalk/mysql-int11-what-does-it-means/
*MySQL ALTER TABLE (add a column, modify a column, drop a column, rename a column or rename a table):* https://www.techonthenet.com/mysql/tables/alter_table.php
*SQL Primary Keys:* https://www.tutorialspoint.com/sql/sql-primary-key.htm
* **Instructions**
* Your assignment is to take these two large sets of data and come up with a method to join them together in order to figure out if a given artist's song and album made it into the charts at the time of their release.
* HINT: This can be done in a couple different ways using external data as well, but you do have all of the data you need within your database to find the correlations. Give your methods some though before having to rely upon external info.
* HINT: Remember that MySQL has the ability to combine two or more tables together so long as they share equivalent data. What data is similar between the two lists?
* Once you have managed to successfully bring the two datasets together, start making queries like those you made earlier to this new table as well.
ALTER TABLE top5000 ADD INDEX song (song);
SELECT * from top5000 WHERE song = 'freebird';
INSERT INTO top5000 (position, artist, song, year, raw_total, raw_usa, raw_uk, raw_eur, raw_row) VALUES
(1,"Bing Crosby","White Christmas",1942,39.903,23.929,5.7,2.185,0.54),
(2,"Bill Haley & his Comets","Rock Around the Clock",1955,36.503,19.961,7.458,5.663,0.76),
(3,"Celine Dion","My Heart Will Go On",1998,35.405,12.636,8.944,23.701,3.61);
SELECT * FROM top5000;
node liri.js concert-this "The Rolling Stones"
node liri.js spotify-this-song "Istanbul (Not Constantinople)"
node liri.js movie-this "Shawshank Redemption"
node liri.js do-what-it-says
"Your code must be readable by other programmers. This is not simply a matter of writing nice comments. Rather, it requires that you craft the code in such a way that it reveals your intent. This is hard to do. Indeed, this may be the most difficult thing a programmer can master." -Robert Martin
@channel Please do a `git pull` to get the latest class repo update, and then copy ‘07-firebase’ into your working directory!