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

CREATE TABLE "song" (
"Song_ID" INT,
"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", "USA");
INSERT INTO "singer" VALUES ("2", "USA");
INSERT INTO "singer" VALUES ("3", "Canada");
INSERT INTO "singer" VALUES ("4", "Canada");
INSERT INTO "singer" VALUES ("5", "Canada");
INSERT INTO "singer" VALUES ("6", "France");
INSERT INTO "singer" VALUES ("7", "France");
INSERT INTO "singer" VALUES ("8", "Germany");
INSERT INTO "singer" VALUES ("9", "Japan");
INSERT INTO "singer" VALUES ("10", "Japan");
INSERT INTO "singer" VALUES ("11", "Japan");
INSERT INTO "singer" VALUES ("12", "Brazil");
INSERT INTO "singer" VALUES ("13", "NULL");
INSERT INTO "singer" VALUES ("14", "NULL");
INSERT INTO "singer" VALUES ("15", "Italy");
INSERT INTO "singer" VALUES ("16", "Italy");
INSERT INTO "singer" VALUES ("17", "Italy");
INSERT INTO "singer" VALUES ("18", "Italy");
INSERT INTO "singer" VALUES ("19", "Norway");
INSERT INTO "singer" VALUES ("20", "Norway");
INSERT INTO "song" VALUES ("1", "1", "50000.0", "1");
INSERT INTO "song" VALUES ("2", "1", "30000.0", "5");
INSERT INTO "song" VALUES ("3", "2", "45000.0", "2");
INSERT INTO "song" VALUES ("4", "3", "20000.0", "10");
INSERT INTO "song" VALUES ("5", "4", "15000.0", "15");
INSERT INTO "song" VALUES ("6", "5", "10000.0", "20");
INSERT INTO "song" VALUES ("7", "6", "25000.0", "7");
INSERT INTO "song" VALUES ("8", "7", "30000.0", "3");
INSERT INTO "song" VALUES ("9", "8", "40000.0", "4");
INSERT INTO "song" VALUES ("10", "9", "35000.0", "6");
INSERT INTO "song" VALUES ("11", "10", "28000.0", "8");
INSERT INTO "song" VALUES ("12", "11", "22000.0", "9");
INSERT INTO "song" VALUES ("13", "12", "18000.0", "12");
INSERT INTO "song" VALUES ("14", "15", "12000.0", "18");
INSERT INTO "song" VALUES ("15", "16", "11000.0", "19");
INSERT INTO "song" VALUES ("16", "17", "13000.0", "17");
INSERT INTO "song" VALUES ("17", "18", "14000.0", "16");
INSERT INTO "song" VALUES ("18", "19", "9000.0", "25");
INSERT INTO "song" VALUES ("19", "20", "8000.0", "30");