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,
PRIMARY KEY ("Singer_ID")
);

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





INSERT INTO "singer" VALUES ("1", "Adele", "1988", "190.5");
INSERT INTO "singer" VALUES ("2", "Bruno Mars", "1985", "175.3");
INSERT INTO "singer" VALUES ("3", "Taylor Swift", "1989", "400.0");
INSERT INTO "singer" VALUES ("4", "Ed Sheeran", "1991", "220.7");
INSERT INTO "singer" VALUES ("5", "Billie Eilish", "2001", "80.2");
INSERT INTO "singer" VALUES ("6", "Elton John", "1947", "500.0");
INSERT INTO "singer" VALUES ("7", "Newcomer Star", "2003", "0.5");
INSERT INTO "singer" VALUES ("8", "Legacy Singer", "1930", "50.0");
INSERT INTO "song" VALUES ("1", "Hello", "1", "150.0");
INSERT INTO "song" VALUES ("2", "Rolling in the Deep", "1", "200.0");
INSERT INTO "song" VALUES ("3", "Uptown Funk", "2", "300.0");
INSERT INTO "song" VALUES ("4", "Just the Way You Are", "2", "250.0");
INSERT INTO "song" VALUES ("5", "Shake It Off", "3", "350.0");
INSERT INTO "song" VALUES ("6", "Blank Space", "3", "320.0");
INSERT INTO "song" VALUES ("7", "Shape of You", "4", "400.0");
INSERT INTO "song" VALUES ("8", "Perfect", "4", "380.0");
INSERT INTO "song" VALUES ("9", "Bad Guy", "5", "180.0");
INSERT INTO "song" VALUES ("10", "Ocean Eyes", "5", "120.0");
INSERT INTO "song" VALUES ("11", "Rocket Man", "6", "210.0");
INSERT INTO "song" VALUES ("12", "Tiny Dancer", "6", "190.0");
INSERT INTO "song" VALUES ("13", "First Hit", "7", "0.1");
INSERT INTO "song" VALUES ("14", "Old Classic", "8", "75.0");