Created
May 30, 2019 16:17
-
-
Save Stebulous/51c6f95a0c644a50bb3eb3d0532b80f5 to your computer and use it in GitHub Desktop.
My project i made.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Script By @Stebulous 2019 | |
*/ | |
/* Create table about the people and what they do here */ | |
CREATE TABLE artists (id INTEGER PRIMARY KEY, name TEXT); | |
/* Inserting Peoples */ | |
INSERT INTO artists VALUES (1, "XXXTENTACION"); | |
INSERT INTO artists VALUES (2, "J. Cole"); | |
INSERT INTO artists VALUES (3, "Ski Mask The Slump God"); | |
/* End Insertion */ | |
/* Create Songs Table */ | |
CREATE TABLE songs (id INTEGER PRiMARY KEY, title TEXT, artist_id INTEGER, release INTEGER, album TEXT); | |
/* End Table Creation */ | |
/* Script By @Stebulous 2019 */ | |
/* Inserting Songs */ | |
INSERT INTO songs VALUES (1, "SAD!", 1, 2018, '"?"'); | |
INSERT INTO songs VALUES (2, "MIDDLE CHILD", 2, 2019, "Revenge of the Dreamers III"); | |
INSERT INTO songs VALUES (3, "BabyWipe", 3, 2017, "You Will Regret(Reloaded)"); | |
INSERT INTO songs VALUES (4, "BAD!", 1, 2018, "Skins"); | |
INSERT INTO songs VALUES (5, "Workout", 2, 2011, "Cole World: The Sideline Story"); | |
INSERT INTO songs VALUES (6, "RUN!", 3, 2018, "Beware The Book of Eli"); | |
INSERT INTO songs VALUES (7, "Neighbors", 2, 2016, "4 Your Eyez Only"); | |
INSERT INTO songs VALUES (8, "Life is Short", 3, 2016,"(Single)"); | |
INSERT INTO songs VALUES (9, "RIP ROACH ft. Ski Mask The Slump God", 1, 2017, "Revenge"); | |
INSERT INTO songs VALUES (10, "Human Centipede", 3, 2016, "(Single)"); | |
INSERT INTO songs VALUES (11, "No Role Modelz", 2, 2014, "2014 Forest Hills Drive"); | |
INSERT INTO songs VALUES (12, "Moonlight", 1, 2018, '"?"'); | |
/* End Insertion */ | |
/* Script By @Stebulous 2019 */ | |
/* Show Playlist */ | |
SELECT artists.name AS Artist, songs.title AS Song_Name, songs.release AS Release_Year, songs.album AS Album FROM artists | |
JOIN songs | |
ON artists.id = songs.artist_id | |
ORDER BY release DESC; | |
/* Sort By X Songs */ | |
SELECT artists.name, songs.title, songs.release, songs.album FROM artists | |
JOIN songs | |
ON artists.id = songs.artist_id | |
WHERE artists.id = 1; | |
/* Sort By J. Cole Songs */ | |
SELECT artists.name, songs.title, songs.release, songs.album FROM artists | |
JOIN songs | |
ON artists.id = songs.artist_id | |
WHERE artists.id = 2; | |
/* Script By @Stebulous 2019 */ | |
/* Sort By Ski Mask Songs */ | |
SELECT artists.name, songs.title, songs.release, songs.album FROM artists | |
JOIN songs | |
ON artists.id = songs.artist_id | |
WHERE artists.id = 3; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment