PRAGMA foreign_keys = ON;

PRAGMA writable_schema = 1;
DELETE FROM sqlite_master WHERE type IN ("table", "index", "trigger");
PRAGMA writable_schema = 0;
VACUUM;

CREATE TABLE "singer" (
"Singer_ID" INT UNIQUE,
"Name" TEXT,
"Birth_Year" FLOAT,
"Net_Worth_Millions" FLOAT,
"Citizenship" TEXT,
PRIMARY KEY ("Singer_ID")
);

CREATE TABLE "song" (
"Song_ID" INT,
"Title" TEXT,
"Singer_ID" INT,
"Sales" FLOAT,
"Highest_Position" FLOAT,
PRIMARY KEY ("Song_ID"),
FOREIGN KEY ("Singer_ID") REFERENCES "singer"("Singer_ID")
);





INSERT INTO "singer" VALUES ("1", "Adele", "1988", "220", "UK");
INSERT INTO "singer" VALUES ("2", "Ed Sheeran", "1991", "200", "UK");
INSERT INTO "singer" VALUES ("3", "Taylor Swift", "1989", "400", "USA");
INSERT INTO "singer" VALUES ("4", "Beyonce", "1981", "500", "USA");
INSERT INTO "singer" VALUES ("5", "Rihanna", "1988", "600", "Barbados");
INSERT INTO "singer" VALUES ("6", "Justin Bieber", "1994", "285", "Canada");
INSERT INTO "singer" VALUES ("7", "Ariana Grande", "1993", "180", "USA");
INSERT INTO "singer" VALUES ("8", "Drake", "1986", "250", "Canada");
INSERT INTO "singer" VALUES ("9", "Katy Perry", "1984", "330", "USA");
INSERT INTO "singer" VALUES ("10", "Bruno Mars", "1985", "175", "USA");
INSERT INTO "singer" VALUES ("11", "Lady Gaga", "1986", "320", "USA");
INSERT INTO "singer" VALUES ("12", "The Weeknd", "1990", "100", "Canada");
INSERT INTO "singer" VALUES ("13", "Sia", "1975", "80", "Australia");
INSERT INTO "singer" VALUES ("14", "Sam Smith", "1992", "30", "UK");
INSERT INTO "singer" VALUES ("15", "Dua Lipa", "1995", "25", "UK");
INSERT INTO "singer" VALUES ("16", "Post Malone", "1995", "30", "USA");
INSERT INTO "singer" VALUES ("17", "Billie Eilish", "2001", "25", "USA");
INSERT INTO "singer" VALUES ("18", "Shawn Mendes", "1998", "38", "Canada");
INSERT INTO "singer" VALUES ("19", "Camila Cabello", "1997", "18", "Cuba");
INSERT INTO "singer" VALUES ("20", "Halsey", "1994", "12", "USA");
INSERT INTO "singer" VALUES ("21", "No Songs Singer 1", "1970", "10", "USA");
INSERT INTO "singer" VALUES ("22", "No Songs Singer 2", "1980", "5", "UK");
INSERT INTO "singer" VALUES ("23", "No Songs Singer 3", "1990", "2", "Canada");
INSERT INTO "song" VALUES ("1", "Hello", "1", "30000000", "1");
INSERT INTO "song" VALUES ("2", "Shape of You", "2", "40000000", "1");
INSERT INTO "song" VALUES ("3", "Blank Space", "3", "15000000", "1");
INSERT INTO "song" VALUES ("4", "Single Ladies", "4", "10000000", "1");
INSERT INTO "song" VALUES ("5", "Umbrella", "5", "12000000", "1");
INSERT INTO "song" VALUES ("6", "Sorry", "6", "20000000", "1");
INSERT INTO "song" VALUES ("7", "Thank U, Next", "7", "18000000", "1");
INSERT INTO "song" VALUES ("8", "God's Plan", "8", "25000000", "1");
INSERT INTO "song" VALUES ("9", "Roar", "9", "16000000", "1");
INSERT INTO "song" VALUES ("10", "Uptown Funk", "10", "22000000", "1");
INSERT INTO "song" VALUES ("11", "Bad Romance", "11", "14000000", "1");
INSERT INTO "song" VALUES ("12", "Blinding Lights", "12", "35000000", "1");
INSERT INTO "song" VALUES ("13", "Chandelier", "13", "9000000", "2");
INSERT INTO "song" VALUES ("14", "Stay With Me", "14", "11000000", "1");
INSERT INTO "song" VALUES ("15", "New Rules", "15", "13000000", "6");
INSERT INTO "song" VALUES ("16", "Circles", "16", "17000000", "1");
INSERT INTO "song" VALUES ("17", "Bad Guy", "17", "19000000", "1");
INSERT INTO "song" VALUES ("18", "Senorita", "18", "21000000", "1");
INSERT INTO "song" VALUES ("19", "Havana", "19", "23000000", "1");
INSERT INTO "song" VALUES ("20", "Without Me", "20", "10000000", "1");
INSERT INTO "song" VALUES ("21", "Rolling in the Deep", "1", "28000000", "1");
INSERT INTO "song" VALUES ("22", "Thinking Out Loud", "2", "19000000", "2");
INSERT INTO "song" VALUES ("23", "Shake It Off", "3", "17000000", "1");
INSERT INTO "song" VALUES ("24", "Formation", "4", "8000000", "10");
INSERT INTO "song" VALUES ("25", "Work", "5", "10000000", "1");
INSERT INTO "song" VALUES ("26", "Love Yourself", "6", "16000000", "1");
INSERT INTO "song" VALUES ("27", "7 Rings", "7", "15000000", "1");
INSERT INTO "song" VALUES ("28", "Hotline Bling", "8", "18000000", "2");
INSERT INTO "song" VALUES ("29", "Dark Horse", "9", "13000000", "1");
INSERT INTO "song" VALUES ("30", "Grenade", "10", "14000000", "1");