-- (1) Crea la tabla spotify CREATE TABLE spotify ( id serial, artist VARCHAR(250), track VARCHAR(250), album VARCHAR(250), album_type VARCHAR(250), danceability DOUBLE PRECISION, energy DOUBLE PRECISION, loudnees DOUBLE PRECISION, speechiness DOUBLE PRECISION, acousticness DOUBLE PRECISION, instrumentalness DOUBLE PRECISION, liveness DOUBLE PRECISION, valance DOUBLE PRECISION, tiempo DOUBLE PRECISION, title VARCHAR(250), channel VARCHAR(250), views int, likes int, comments int, licensed boolean, oficial_video boolean, stream int, most_playedon VARCHAR(250), CONSTRAINT PK_SPOTIFY PRIMARY KEY (id) ); -- (2) Elimina la tabla spotify --DROP TABLE spotify; -- (3) Agregar registros a la tabla spotify INSERT INTO spotify (artist, track, album, album_type, danceability, energy, loudnees, speechiness, acousticness, instrumentalness, liveness, valance, tiempo, title, channel, views, likes, comments, licensed, oficial_video, stream, most_playedon) VALUES ('50 Cent','In Da Club','Get Rich Or Die Tryin', 'album',0.902,0.72,-2.776,0.347,0.26,0,0.0749,0.805,90.059,'50 Cent - In Da Club (Official Music Video)','50CentVEVO',1682616458,10481678,296745,true,true,1041736808,'Youtube'); INSERT INTO spotify (artist, track, album, album_type, danceability, energy, loudnees, speechiness, acousticness, instrumentalness, liveness, valance, tiempo, title, channel, views, likes, comments, licensed, oficial_video, stream, most_playedon) VALUES ('Gorillaz','Clint Eastwood','Gorillaz', 'album',0.663,0.694,-8.627,0.171,0.0253,0,0.0698,0.525,167.953,'Gorillaz - Clint Eastwood (Official Video)','Gorillaz',618480958,6197318,155930,true,true,617259738,'Youtube'); INSERT INTO spotify (artist, track, album, album_type, danceability, energy, loudnees, speechiness, acousticness, instrumentalness, liveness, valance, tiempo, title, channel, views, likes, comments, licensed, oficial_video, stream, most_playedon) VALUES ('Gorillaz','DARE','Demon Days', 'album',0.76,0.891,-5.852,0.0372,0.0229,0.0869,0.298,0.966,120.264,'Gorillaz - DARE (Official Video)','Gorillaz',259021161,1844658,72008,true,true,323850327,'Spotify'); INSERT INTO spotify (artist, track, album, album_type, danceability, energy, loudnees, speechiness, acousticness, instrumentalness, liveness, valance, tiempo, title, channel, views, likes, comments, licensed, oficial_video, stream, most_playedon) VALUES ('Gorillaz','New Gold (feat. Tame Impala and Bootie Brown) - Dom Dolla Remix','New Gold (feat. Tame Impala and Bootie Brown) [Dom Dolla Remix]', 'single',0.716,0.897,-7.185,0.0629,0.012,0.262,0.325,0.358,127.03,'Gorillaz - New Gold ft. Tame Impala', 'Bootie Brown (Dom Dolla Remix) (Official Live Video) Dom Dolla',451996,11686,241,false,true,10666154,'Spotify'); INSERT INTO spotify (artist, track, album, album_type, danceability, energy, loudnees, speechiness, acousticness, instrumentalness, liveness, valance, tiempo, title, channel, views, likes, comments, licensed, oficial_video, stream, most_playedon) VALUES ('Gorillaz','Shes My Collar (feat. Kali Uchis)','Humanz (Deluxe)', 'album',0.726,0.815,-5.886,0.0313,0.00799,0.081,0.112,0.462,140.158,'Gorillaz - Shes My Collar [HQ]','SalvaMuñox',1010982,17675,260,false,false,159605929,'Spotify'); INSERT INTO spotify (artist, track, album, album_type, danceability, energy, loudnees, speechiness, acousticness, instrumentalness, liveness, valance, tiempo, title, channel, views, likes, comments, licensed, oficial_video, stream, most_playedon) VALUES ('Red Hot Chili Peppers','Californication','Californication (Deluxe Edition)', 'album',0.592,0.767,-2.788,0.027,0.0021,0.00165,0.127,0.328,96.483,'Red Hot Chili Peppers - Californication (Official Music Video) [HD UPGRADE]','Red Hot Chili Peppers',1018811259,4394471,121452,true,true,1055738398,'Spotify'); INSERT INTO spotify (artist, track, album, album_type, danceability, energy, loudnees, speechiness, acousticness, instrumentalness, liveness, valance, tiempo, title, channel, views, likes, comments, licensed, oficial_video, stream, most_playedon) VALUES ('Red Hot Chili Peppers','Under the Bridge','Blood Sugar Sex Magik (Deluxe Edition)', 'album',0.559,0.345,-13.496,0.0459,0.0576,0.000105,0.141,0.458,84.581,'Red Hot Chili Peppers - Under The Bridge [Official Music Video]','Red Hot Chili Peppers',246687714,1213572,32761,true,true,1061750522,'Spotify'); INSERT INTO spotify (artist, track, album, album_type, danceability, energy, loudnees, speechiness, acousticness, instrumentalness, liveness, valance, tiempo, title, channel, views, likes, comments, licensed, oficial_video, stream, most_playedon) VALUES ('Red Hot Chili Peppers','Cant Stop','By the Way (Deluxe Edition)', 'album',0.618,0.938,-3.442,0.0456,0.0179,0,0.167,0.875,91.455,'Red Hot Chili Peppers - Cant Stop [Official Music Video]','Red Hot Chili Peppers',336635759,1740224,32573,true,true,866464951,'Spotify'); INSERT INTO spotify (artist, track, album, album_type, danceability, energy, loudnees, speechiness, acousticness, instrumentalness, liveness, valance, tiempo, title, channel, views, likes, comments, licensed, oficial_video, stream, most_playedon) VALUES ('Metallica','Master of Puppets (Remastered)','Master of Puppets (Remastered Deluxe Box Set)', 'album',0.539,0.828,-9.108,0.035,0.00067,0.421,0.154,0.562,105.25,'Master of Puppets (Remastered)','Metallica - Topic',20762910,293409,1703,true,true,0,'Youtube'); INSERT INTO spotify (artist, track, album, album_type, danceability, energy, loudnees, speechiness, acousticness, instrumentalness, liveness, valance, tiempo, title, channel, views, likes, comments, licensed, oficial_video, stream, most_playedon) VALUES ('Metallica','Whiskey In The Jar','Garage, Inc.', 'album',0.511,0.972,-3.751,0.0413,0.00000536,0.00101,0.19,0.532,132.97,'Metallica - Whiskey In The Jar (Official Music Video)','Warner Records Vault',107553434,429797,12074,false,false,327681785,'Spotify'); INSERT INTO spotify (artist, track, album, album_type, danceability, energy, loudnees, speechiness, acousticness, instrumentalness, liveness, valance, tiempo, title, channel, views, likes, comments, licensed, oficial_video, stream, most_playedon) VALUES ('Metallica','The Unforgiven (Remastered)','Metallica (Remastered)', 'album',0.531,0.583,-9.47,0.0256,0.0184,0.00624,0.255,0.207,139.503,'Metallica - The Unforgiven (Official Music Video)','Warner Records Vault',426125708,1781690,46392,false,false,0,'Youtube'); INSERT INTO spotify (artist, track, album, album_type, danceability, energy, loudnees, speechiness, acousticness, instrumentalness, liveness, valance, tiempo, title, channel, views, likes, comments, licensed, oficial_video, stream, most_playedon) VALUES ('Metallica','One (Remastered)','...And Justice for All (Remastered Deluxe Box Set)', 'album',0.438,0.687,-9.15,0.0619,0.000668,0.0801,0.42,0.426,103.01,'Metallica - One (Official Music Video) [Remastered in HD]','No Music, No Life !',524,18,1,false,false,0,'Youtube'); INSERT INTO spotify (artist, track, album, album_type, danceability, energy, loudnees, speechiness, acousticness, instrumentalness, liveness, valance, tiempo, title, channel, views, likes, comments, licensed, oficial_video, stream, most_playedon) VALUES ('Metallica','Screaming Suicide','Screaming Suicide', 'single',0.425,0.972,-3.448,0.045,0.0000242,0.0202,0.239,0.282,101.125,'Metallica: Screaming Suicide (Official Music Video)','Metallica',4317758,217109,17225,true,true,3905429,'Youtube'); INSERT INTO spotify (artist, track, album, album_type, danceability, energy, loudnees, speechiness, acousticness, instrumentalness, liveness, valance, tiempo, title, channel, views, likes, comments, licensed, oficial_video, stream, most_playedon) VALUES ('Coldplay','Yellow','Parachutes', 'album',0.429,0.661,-7.227,0.0281,0.00239,0.000121,0.234,0.285,173.372,'Coldplay - Yellow (Official Video)','Coldplay',832532409,4600933,118296,true,true,1483622308,'Spotify'); INSERT INTO spotify (artist, track, album, album_type, danceability, energy, loudnees, speechiness, acousticness, instrumentalness, liveness, valance, tiempo, title, channel, views, likes, comments, licensed, oficial_video, stream, most_playedon) VALUES ('Coldplay','Viva La Vida','Viva La Vida or Death and All His Friends', 'album',0.486,0.617,-7.115,0.0287,0.0954,0.00000323,0.109,0.417,138.015,'Coldplay - Viva La Vida (Official Video)','Coldplay',789581468,4370461,261790,true,true,1325575712,'Spotify'); INSERT INTO spotify (artist, track, album, album_type, danceability, energy, loudnees, speechiness, acousticness, instrumentalness, liveness, valance, tiempo, title, channel, views, likes, comments, licensed, oficial_video, stream, most_playedon) VALUES ('Coldplay','Sparks','Parachutes', 'album',0.371,0.268,-10.506,0.0281,0.748,0.0517,0.104,0.165,102.617,'Sparks','Coldplay - Topic',73201019,787343,1637,true,true,475353044,'Spotify'); INSERT INTO spotify (artist, track, album, album_type, danceability, energy, loudnees, speechiness, acousticness, instrumentalness, liveness, valance, tiempo, title, channel, views, likes, comments, licensed, oficial_video, stream, most_playedon) VALUES ('Coldplay','Something Just Like This','Memories...Do Not Open', 'album',0.617,0.635,-6.769,0.0317,0.0498,0.0000144,0.164,0.446,103.019,'The Chainsmokers & Coldplay - Something Just Like This (Lyric)','ChainsmokersVEVO',2118018686,10282499,270444,true,true,2030825694,'Youtube'); INSERT INTO spotify (artist, track, album, album_type, danceability, energy, loudnees, speechiness, acousticness, instrumentalness, liveness, valance, tiempo, title, channel, views, likes, comments, licensed, oficial_video, stream, most_playedon) VALUES ('Black Eyed Peas','Just Cant Get Enough','The Beginning', 'album',0.659,0.628,-8.685,0.179,0.186,0,0.105,0.262,94.05,'The Black Eyed Peas - Just Cant Get Enough (Official Music Video)','BlackEyedPeasVEVO',292211575,1594576,70720,true,true,331578264,'Spotify'); INSERT INTO spotify (artist, track, album, album_type, danceability, energy, loudnees, speechiness, acousticness, instrumentalness, liveness, valance, tiempo, title, channel, views, likes, comments, licensed, oficial_video, stream, most_playedon) VALUES ('Black Eyed Peas','GIRL LIKE ME','TRANSLATION', 'album',0.965,0.485,-8.784,0.191,0.0206,0.0237,0.0655,0.312,124.025,'Black Eyed Peas, Shakira - GIRL LIKE ME (Official Music Video)','BlackEyedPeasVEVO',662529115,5488829,222922,true,true,453923193,'Youtube'); -- (4) Selecciona todos los registros de la tabla spotify --SELECT * FROM spotify;