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,
"Net_Worth_Millions" FLOAT,
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", "190.5");
INSERT INTO "singer" VALUES ("2", "Bruno Mars", "120.3");
INSERT INTO "singer" VALUES ("3", "Taylor Swift", "400.0");
INSERT INTO "singer" VALUES ("4", "Ed Sheeran", "220.7");
INSERT INTO "singer" VALUES ("5", "Billie Eilish", "80.2");
INSERT INTO "singer" VALUES ("6", "Unknown Artist", "0.0");
INSERT INTO "singer" VALUES ("7", "Newcomer", "1.5");
INSERT INTO "song" VALUES ("101", "Hello", "1", "500000.0", "1");
INSERT INTO "song" VALUES ("102", "Rolling in the Deep", "1", "350000.0", "2");
INSERT INTO "song" VALUES ("103", "Grenade", "2", "250000.0", "3");
INSERT INTO "song" VALUES ("104", "Just the Way You Are", "2", "310000.0", "1");
INSERT INTO "song" VALUES ("105", "Shake It Off", "3", "700000.0", "1");
INSERT INTO "song" VALUES ("106", "Blank Space", "3", "450000.0", "1");
INSERT INTO "song" VALUES ("107", "Shape of You", "4", "900000.0", "1");
INSERT INTO "song" VALUES ("108", "Perfect", "4", "280000.0", "2");
INSERT INTO "song" VALUES ("109", "Bad Guy", "5", "320000.0", "1");
INSERT INTO "song" VALUES ("110", "Ocean Eyes", "5", "150000.0", "5");
INSERT INTO "song" VALUES ("111", "Unknown Hit", "6", "0.0", "100");
INSERT INTO "song" VALUES ("112", "New Song", "7", "300001.0", "50");