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 "constructorResults" (
"constructorResultsId" INT,
"points" FLOAT,
PRIMARY KEY ("constructorResultsId")
);

CREATE TABLE "constructorStandings" (
"constructorStandingsId" INT,
"raceId" INT,
"constructorId" INT,
"position" INT,
PRIMARY KEY ("constructorStandingsId"),
FOREIGN KEY ("raceId") REFERENCES "races"("raceId"),
FOREIGN KEY ("constructorId") REFERENCES "constructors"("constructorId")
);

CREATE TABLE "constructors" (
"constructorId" INT UNIQUE,
"name" TEXT,
PRIMARY KEY ("constructorId")
);

CREATE TABLE "races" (
"raceId" INT,
"name" TEXT,
PRIMARY KEY ("raceId")
);

CREATE TABLE "results" (
"resultId" INT,
"points" FLOAT,
PRIMARY KEY ("resultId")
);



INSERT INTO "constructorResults" VALUES ("1", "25.0");
INSERT INTO "constructorResults" VALUES ("2", "18.0");
INSERT INTO "constructorResults" VALUES ("3", "15.0");
INSERT INTO "constructorResults" VALUES ("4", "12.0");
INSERT INTO "constructorResults" VALUES ("5", "10.0");
INSERT INTO "constructorResults" VALUES ("6", "8.0");
INSERT INTO "constructorResults" VALUES ("7", "6.0");
INSERT INTO "constructorResults" VALUES ("8", "4.0");
INSERT INTO "constructorResults" VALUES ("9", "2.0");
INSERT INTO "constructorResults" VALUES ("10", "1.0");
INSERT INTO "constructorResults" VALUES ("11", "0.0");
INSERT INTO "constructors" VALUES ("1", "Mercedes");
INSERT INTO "constructors" VALUES ("2", "Red Bull");
INSERT INTO "constructors" VALUES ("3", "Ferrari");
INSERT INTO "constructors" VALUES ("4", "McLaren");
INSERT INTO "constructors" VALUES ("5", "Alpine");
INSERT INTO "constructors" VALUES ("6", "Aston Martin");
INSERT INTO "constructors" VALUES ("7", "AlphaTauri");
INSERT INTO "constructors" VALUES ("8", "Alfa Romeo");
INSERT INTO "constructors" VALUES ("9", "Haas F1 Team");
INSERT INTO "constructors" VALUES ("10", "Williams");
INSERT INTO "races" VALUES ("1", "Bahrain Grand Prix");
INSERT INTO "races" VALUES ("2", "Emilia Romagna Grand Prix");
INSERT INTO "races" VALUES ("3", "Portuguese Grand Prix");
INSERT INTO "races" VALUES ("4", "Spanish Grand Prix");
INSERT INTO "races" VALUES ("5", "Monaco Grand Prix");
INSERT INTO "races" VALUES ("6", "Azerbaijan Grand Prix");
INSERT INTO "races" VALUES ("7", "French Grand Prix");
INSERT INTO "races" VALUES ("8", "Styrian Grand Prix");
INSERT INTO "races" VALUES ("9", "Austrian Grand Prix");
INSERT INTO "races" VALUES ("10", "British Grand Prix");
INSERT INTO "constructorStandings" VALUES ("1", "1", "1", "1");
INSERT INTO "constructorStandings" VALUES ("2", "1", "2", "2");
INSERT INTO "constructorStandings" VALUES ("3", "1", "3", "3");
INSERT INTO "constructorStandings" VALUES ("4", "2", "2", "1");
INSERT INTO "constructorStandings" VALUES ("5", "2", "1", "2");
INSERT INTO "constructorStandings" VALUES ("6", "2", "4", "3");
INSERT INTO "constructorStandings" VALUES ("7", "3", "1", "1");
INSERT INTO "constructorStandings" VALUES ("8", "3", "2", "2");
INSERT INTO "constructorStandings" VALUES ("9", "3", "3", "3");
INSERT INTO "constructorStandings" VALUES ("10", "4", "2", "1");
INSERT INTO "constructorStandings" VALUES ("11", "4", "1", "2");
INSERT INTO "constructorStandings" VALUES ("12", "4", "5", "3");
INSERT INTO "constructorStandings" VALUES ("13", "5", "2", "1");
INSERT INTO "constructorStandings" VALUES ("14", "5", "3", "2");
INSERT INTO "constructorStandings" VALUES ("15", "5", "1", "3");
INSERT INTO "constructorStandings" VALUES ("16", "6", "2", "1");
INSERT INTO "constructorStandings" VALUES ("17", "6", "1", "2");
INSERT INTO "constructorStandings" VALUES ("18", "6", "4", "3");
INSERT INTO "constructorStandings" VALUES ("19", "7", "1", "1");
INSERT INTO "constructorStandings" VALUES ("20", "7", "2", "2");
INSERT INTO "constructorStandings" VALUES ("21", "7", "3", "3");
INSERT INTO "constructorStandings" VALUES ("22", "8", "2", "1");
INSERT INTO "constructorStandings" VALUES ("23", "8", "1", "2");
INSERT INTO "constructorStandings" VALUES ("24", "8", "4", "3");
INSERT INTO "constructorStandings" VALUES ("25", "9", "2", "1");
INSERT INTO "constructorStandings" VALUES ("26", "9", "1", "2");
INSERT INTO "constructorStandings" VALUES ("27", "9", "3", "3");
INSERT INTO "constructorStandings" VALUES ("28", "10", "1", "1");
INSERT INTO "constructorStandings" VALUES ("29", "10", "2", "2");
INSERT INTO "constructorStandings" VALUES ("30", "10", "4", "3");
INSERT INTO "results" VALUES ("1", "25.0");
INSERT INTO "results" VALUES ("2", "18.0");
INSERT INTO "results" VALUES ("3", "15.0");
INSERT INTO "results" VALUES ("4", "12.0");
INSERT INTO "results" VALUES ("5", "10.0");
INSERT INTO "results" VALUES ("6", "8.0");
INSERT INTO "results" VALUES ("7", "6.0");
INSERT INTO "results" VALUES ("8", "4.0");
INSERT INTO "results" VALUES ("9", "2.0");
INSERT INTO "results" VALUES ("10", "1.0");
INSERT INTO "results" VALUES ("11", "0.0");