nl2sqlproj/spider2-nl2sql huggingface dataset:
-- DBMS: sqlite
CREATE TABLE product (
    productid INTEGER,
    NAME TEXT,
    productnumber TEXT,
    makeflag BOOLEAN,
    finishedgoodsflag BOOLEAN,
    color TEXT,
    safetystocklevel INTEGER,
    reorderpoint INTEGER,
    standardcost FLOAT,
    listprice FLOAT,
    size TEXT,
    sizeunitmeasurecode TEXT,
    weightunitmeasurecode TEXT,
    weight FLOAT,
    daystomanufacture INTEGER,
    productline TEXT,
    class TEXT,
    style TEXT,
    productsubcategoryid INTEGER,
    productmodelid INTEGER,
    sellstartdate DATE,
    sellenddate DATE,
    discontinueddate DATE,
    rowguid TEXT,
    modifieddate DATE
);

INSERT INTO product (productid, NAME, productnumber, makeflag, finishedgoodsflag, color, safetystocklevel, reorderpoint, standardcost, listprice, size, sizeunitmeasurecode, weightunitmeasurecode, weight, daystomanufacture, productline, class, style, productsubcategoryid, productmodelid, sellstartdate, sellenddate, discontinueddate, rowguid, modifieddate) VALUES (791, 'Road-250 Red, 52', 'BK-R89R-52', 't', 't', 'Red', 100, 75, 1518.7864, 2443.35, '52', 'CM ', 'LB ', 15.42, 4, 'R ', 'H ', 'U ', 2, 26, '2012-05-30 00:00:00', '2013-05-29 00:00:00', '', 'c9fd1df4-9512-420a-b379-067108033b75', '2014-02-08 10:01:36.827'), (394, 'Hex Nut 15', 'HN-7162', 'f', 'f', '', 1000, 750, 0.0, 0.0, '', '', '', '', 0, '', '', '', '', '', '2008-04-30 00:00:00', '', '', '35e28755-e8f0-47be-a8be-a20836dbe28d', '2014-02-08 10:01:36.827'), (401, 'HL Hub', 'HU-8998', 't', 'f', '', 500, 375, 0.0, 0.0, '', '', '', '', 1, '', '', '', '', '', '2008-04-30 00:00:00', '', '', 'd59403a3-d19e-4803-bda2-b436a6416fda', '2014-02-08 10:01:36.827'), (460, 'Lock Nut 18', 'LN-9161', 'f', 'f', '', 1000, 750, 0.0, 0.0, '', '', '', '', 0, '', '', '', '', '', '2008-04-30 00:00:00', '', '', 'a420963f-92fd-4cd4-8531-6926e4162c41', '2014-02-08 10:01:36.827'), (345, 'Flat Washer 4', 'FW-3800', 'f', 'f', '', 1000, 750, 0.0, 0.0, '', '', '', '', 0, '', '', '', '', '', '2008-04-30 00:00:00', '', '', '2c1c58b4-234c-4b3a-8c8e-84524ac05eea', '2014-02-08 10:01:36.827');
-- DBMS: sqlite
CREATE TABLE productmodelproductdescriptionculture (
    productmodelid INTEGER,
    productdescriptionid INTEGER,
    cultureid TEXT,
    modifieddate DATE
);

INSERT INTO productmodelproductdescriptionculture (productmodelid, productdescriptionid, cultureid, modifieddate) VALUES (27, 1743, 'he', '2013-04-30 00:00:00'), (78, 1384, 'ar', '2013-04-30 00:00:00'), (91, 1567, 'fr', '2013-04-30 00:00:00'), (120, 1462, 'ar', '2013-04-30 00:00:00'), (113, 1764, 'he', '2013-04-30 00:00:00');
-- DBMS: sqlite
CREATE TABLE constructors_ext (
    constructor_id INT,
    constructor_ref TEXT,
    name TEXT,
    nationality TEXT,
    url TEXT,
    short_name 
);

INSERT INTO constructors_ext (constructor_id, constructor_ref, name, nationality, url, short_name) VALUES (63, 'surtees', 'Surtees', 'British', 'http://en.wikipedia.org/wiki/Surtees', 'Surtees'), (189, 'eagle-climax', 'Eagle-Climax', 'American', 'http://en.wikipedia.org/wiki/Anglo_American_Racers', 'Eagle'), (52, 'spirit', 'Spirit', 'British', 'http://en.wikipedia.org/wiki/Spirit_(racing_team)', 'Spirit'), (71, 'apollon', 'Apollon', 'Swiss', 'http://en.wikipedia.org/wiki/Apollon_(Formula_One)', 'Apollon'), (26, 'lola', 'Lola', 'British', 'http://en.wikipedia.org/wiki/MasterCard_Lola', 'Lola');
-- DBMS: sqlite
CREATE TABLE races_ext (
    race_id INT,
    year INT,
    round INT,
    circuit_id INT,
    name TEXT,
    date NUM,
    time NUM,
    url TEXT,
    fp1_date TEXT,
    fp1_time TEXT,
    fp2_date TEXT,
    fp2_time TEXT,
    fp3_date TEXT,
    fp3_time TEXT,
    quali_date TEXT,
    quali_time TEXT,
    sprint_date TEXT,
    sprint_time TEXT,
    is_pit_data_available ,
    short_name ,
    has_sprint ,
    max_points 
);

INSERT INTO races_ext (race_id, year, round, circuit_id, name, date, time, url, fp1_date, fp1_time, fp2_date, fp2_time, fp3_date, fp3_time, quali_date, quali_time, sprint_date, sprint_time, is_pit_data_available, short_name, has_sprint, max_points) VALUES (6, 2009, 6, 6, 'Monaco Grand Prix', '2009-05-24', '12:00:00', 'http://en.wikipedia.org/wiki/2009_Monaco_Grand_Prix', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 'Monaco', 0, 10), (530, 1978, 4, 43, 'United States Grand Prix West', '1978-04-02', NULL, 'http://en.wikipedia.org/wiki/1978_United_States_Grand_Prix_West', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 'United States Grand Prix West', 0, 9), (173, 2000, 16, 22, 'Japanese Grand Prix', '2000-10-08', NULL, 'http://en.wikipedia.org/wiki/2000_Japanese_Grand_Prix', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 'Japan', 0, 10), (875, 2012, 16, 35, 'Korean Grand Prix', '2012-10-14', '06:00:00', 'http://en.wikipedia.org/wiki/2012_Korean_Grand_Prix', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 'Korea', 0, 25), (984, 2017, 16, 22, 'Japanese Grand Prix', '2017-10-08', '05:00:00', 'http://en.wikipedia.org/wiki/2017_Japanese_Grand_Prix', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 'Japan', 0, 25);
-- DBMS: sqlite
CREATE TABLE lap_positions (
    race_id INT,
    driver_id INT,
    lap INT,
    position INT,
    lap_type 
);

INSERT INTO lap_positions (race_id, driver_id, lap, position, lap_type) VALUES (1073, 846, 35, 7, 'Race'), (915, 815, 28, 13, 'Race'), (347, 811, 58, 19, 'Race'), (983, 815, 15, 5, 'Race'), (882, 819, 35, 16, 'Race');
-- DBMS: sqlite
CREATE TABLE races (
    race_id INT(11),
    year INT(11),
    round INT(11),
    circuit_id INT(11),
    name VARCHAR(255),
    date DATE,
    time TIME,
    url VARCHAR(255),
    fp1_date VARCHAR(255),
    fp1_time VARCHAR(255),
    fp2_date VARCHAR(255),
    fp2_time VARCHAR(255),
    fp3_date VARCHAR(255),
    fp3_time VARCHAR(255),
    quali_date VARCHAR(255),
    quali_time VARCHAR(255),
    sprint_date VARCHAR(255),
    sprint_time VARCHAR(255)
);

INSERT INTO races (race_id, year, round, circuit_id, name, date, time, url, fp1_date, fp1_time, fp2_date, fp2_time, fp3_date, fp3_time, quali_date, quali_time, sprint_date, sprint_time) VALUES (1107, 2023, 9, 70, 'Austrian Grand Prix', '2023-07-02', '13:00:00', 'https://en.wikipedia.org/wiki/2023_Austrian_Grand_Prix', '2023-06-30', '11:30:00', '2023-07-01', '10:30:00', NULL, NULL, '2023-06-30', '15:00:00', '2023-07-01', '14:30:00'), (676, 1968, 10, 52, 'Canadian Grand Prix', '1968-09-22', NULL, 'http://en.wikipedia.org/wiki/1968_Canadian_Grand_Prix', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (136, 2002, 13, 11, 'Hungarian Grand Prix', '2002-08-18', NULL, 'http://en.wikipedia.org/wiki/2002_Hungarian_Grand_Prix', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (179, 1999, 5, 4, 'Spanish Grand Prix', '1999-05-30', NULL, 'http://en.wikipedia.org/wiki/1999_Spanish_Grand_Prix', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (821, 1952, 5, 9, 'British Grand Prix', '1952-07-19', NULL, 'http://en.wikipedia.org/wiki/1952_British_Grand_Prix', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-- DBMS: sqlite
CREATE TABLE qualifying (
    qualify_id INT(11),
    race_id INT(11),
    driver_id INT(11),
    constructor_id INT(11),
    number INT(11),
    position INT(11),
    q1 VARCHAR(255),
    q2 VARCHAR(255),
    q3 VARCHAR(255)
);

INSERT INTO qualifying (qualify_id, race_id, driver_id, constructor_id, number, position, q1, q2, q3) VALUES (5317, 874, 5, 207, 20, 19, '1:34.657', NULL, NULL), (8313, 1027, 840, 211, 18, 16, '1:18.065', NULL, NULL), (5822, 898, 815, 1, 6, 7, '1:38.367', '1:38.040', '1:37.452'), (5452, 880, 807, 15, 11, 11, '1:45.930', '1:38.067', NULL), (2766, 264, 44, 27, 26, 15, '1:27.785', NULL, NULL);
-- DBMS: sqlite
CREATE TABLE constructors (
    constructor_id INT(11),
    constructor_ref VARCHAR(255),
    name VARCHAR(255),
    nationality VARCHAR(255),
    url VARCHAR(255)
);

INSERT INTO constructors (constructor_id, constructor_ref, name, nationality, url) VALUES (170, 'cooper-climax', 'Cooper-Climax', 'British', 'http://en.wikipedia.org/wiki/Cooper_Car_Company'), (182, 'brabham-ford', 'Brabham-Ford', 'British', 'http://en.wikipedia.org/wiki/Brabham'), (13, 'mf1', 'MF1', 'Russian', 'http://en.wikipedia.org/wiki/Midland_F1_Racing'), (206, 'marussia', 'Marussia', 'Russian', 'http://en.wikipedia.org/wiki/Marussia_F1'), (33, 'larrousse', 'Larrousse', 'French', 'http://en.wikipedia.org/wiki/Larrousse');
-- DBMS: sqlite
CREATE TABLE constructor_results (
    constructor_results_id INT(11),
    race_id INT(11),
    constructor_id INT(11),
    points FLOAT,
    status VARCHAR(255)
);

INSERT INTO constructor_results (constructor_results_id, race_id, constructor_id, points, status) VALUES (1506, 161, 20, 0.0, NULL), (11729, 644, 6, 0.0, NULL), (12785, 582, 56, 0.0, NULL), (12151, 629, 6, 0.0, NULL), (16805, 1112, 117, 2.0, NULL);
-- DBMS: sqlite
CREATE TABLE retirements (
    race_id INT,
    driver_id INT,
    lap ,
    position_order INT,
    status_id INT,
    retirement_type 
);

INSERT INTO retirements (race_id, driver_id, lap, position_order, status_id, retirement_type) VALUES (108, 17, 16, 17, 22, 'Retirement (Mechanical Problem)'), (504, 173, 4, 22, 8, 'Retirement (Mechanical Problem)'), (292, 122, 63, 10, 20, 'Retirement (Driver Error)'), (367, 157, 1, 29, 81, 'Retirement (Mechanical Problem)'), (610, 232, 59, 14, 51, 'Retirement (Mechanical Problem)');
-- DBMS: sqlite
CREATE TABLE short_grand_prix_names (
    full_name VARCHAR(255),
    short_name VARCHAR(255)
);

INSERT INTO short_grand_prix_names (full_name, short_name) VALUES ('United States Grand Prix', 'United States'), ('Monaco Grand Prix', 'Monaco'), ('Qatar Grand Prix', 'Qatar'), ('Russian Grand Prix', 'Russia'), ('European Grand Prix', 'Europe');
-- DBMS: sqlite
CREATE TABLE results (
    result_id INT(11),
    race_id INT(11),
    driver_id INT(11),
    constructor_id INT(11),
    number INT(11),
    grid INT(11),
    position INT(11),
    position_text VARCHAR(255),
    position_order INT(11),
    points FLOAT,
    laps INT(11),
    time VARCHAR(255),
    milliseconds INT(11),
    fastest_lap INT(11),
    rank INT(11),
    fastest_lap_time VARCHAR(255),
    fastest_lap_speed VARCHAR(255),
    status_id INT(11)
);

INSERT INTO results (result_id, race_id, driver_id, constructor_id, number, grid, position, position_text, position_order, points, laps, time, milliseconds, fastest_lap, rank, fastest_lap_time, fastest_lap_speed, status_id) VALUES (13392, 548, 229, 64, 25, 0, nan, 'F', 23, 0.0, 0, NULL, nan, nan, nan, NULL, NULL, 81), (5230, 260, 106, 33, 19, 18, 8.0, '8', 8, 0.0, 76, NULL, nan, nan, nan, NULL, NULL, 12), (7199, 326, 110, 35, 22, 15, 13.0, '13', 13, 0.0, 68, NULL, nan, nan, nan, NULL, NULL, 11), (22727, 936, 13, 3, 19, 8, 12.0, '12', 12, 0.0, 69, '+1:14.278', 6444263.0, 59.0, 6.0, '1:26.864', '181.566', 1), (5622, 274, 109, 15, 30, 7, nan, 'R', 14, 0.0, 52, NULL, nan, nan, nan, NULL, NULL, 10);
-- DBMS: sqlite
CREATE TABLE circuits (
    circuit_id INT(11),
    circuit_ref VARCHAR(255),
    name VARCHAR(255),
    location VARCHAR(255),
    country VARCHAR(255),
    lat FLOAT,
    lng FLOAT,
    alt INT(11),
    url VARCHAR(255)
);

INSERT INTO circuits (circuit_id, circuit_ref, name, location, country, lat, lng, alt, url) VALUES (8, 'magny_cours', 'Circuit de Nevers Magny-Cours', 'Magny Cours', 'France', 46.8642, 3.16361, 228, 'http://en.wikipedia.org/wiki/Circuit_de_Nevers_Magny-Cours'), (26, 'jerez', 'Circuito de Jerez', 'Jerez de la Frontera', 'Spain', 36.7083, -6.03417, 37, 'http://en.wikipedia.org/wiki/Circuito_Permanente_de_Jerez'), (16, 'fuji', 'Fuji Speedway', 'Oyama', 'Japan', 35.3717, 138.927, 583, 'http://en.wikipedia.org/wiki/Fuji_Speedway'), (27, 'estoril', 'Autódromo do Estoril', 'Estoril', 'Portugal', 38.7506, -9.39417, 130, 'http://en.wikipedia.org/wiki/Aut%C3%B3dromo_do_Estoril'), (17, 'shanghai', 'Shanghai International Circuit', 'Shanghai', 'China', 31.3389, 121.22, 5, 'http://en.wikipedia.org/wiki/Shanghai_International_Circuit');
-- DBMS: sqlite
CREATE TABLE short_constructor_names (
    constructor_ref VARCHAR(255),
    short_name VARCHAR(255)
);

INSERT INTO short_constructor_names (constructor_ref, short_name) VALUES ('brabham-alfa_romeo', 'Brabham'), ('lds-climax', 'LDS'), ('brabham-repco', 'Brabham'), ('lotus-climax', 'Lotus'), ('cooper-osca', 'Cooper');
-- DBMS: sqlite
CREATE TABLE sprint_results (
    result_id INT(11),
    race_id INT(11),
    driver_id INT(11),
    constructor_id INT(11),
    number INT(11),
    grid INT(11),
    position INT(11),
    position_text VARCHAR(255),
    position_order INT(11),
    points FLOAT,
    laps INT(11),
    time VARCHAR(255),
    milliseconds INT(11),
    fastest_lap INT(11),
    fastest_lap_time VARCHAR(255),
    fastest_lap_speed VARCHAR(255),
    status_id INT(11)
);

INSERT INTO sprint_results (result_id, race_id, driver_id, constructor_id, number, grid, position, position_text, position_order, points, laps, time, milliseconds, fastest_lap, fastest_lap_time, fastest_lap_speed, status_id) VALUES (175, 1110, 855, 51, 24, 19, 15, '15', 15, 0.0, 11, '+36.342', 1534775, 6, '2:04.760', NULL, 1), (57, 1071, 847, 3, 63, 17, 17, '17', 17, 0.0, 24, '+47.739', 1797298, 14, '1:14.056', NULL, 1), (71, 1077, 847, 131, 63, 11, 11, '11', 11, 0.0, 21, '+36.284', 1875851, 19, '1:20.756', NULL, 1), (2, 1061, 1, 131, 44, 1, 2, '2', 2, 2.0, 17, '+1.430', 1539856, 17, '1:29.937', NULL, 1), (254, 1125, 840, 117, 18, 15, 14, '14', 14, 0.0, 19, '+40.299', 1964959, 5, '1:42.258', NULL, 1);
-- DBMS: sqlite
CREATE TABLE circuits_ext (
    circuit_id INT,
    circuit_ref TEXT,
    name TEXT,
    location TEXT,
    country TEXT,
    lat REAL,
    lng REAL,
    alt INT,
    url TEXT,
    last_race_year ,
    number_of_races 
);

INSERT INTO circuits_ext (circuit_id, circuit_ref, name, location, country, lat, lng, alt, url, last_race_year, number_of_races) VALUES (56, 'george', 'Prince George Circuit', 'Eastern Cape Province', 'South Africa', -33.0486, 27.8736, 15, 'http://en.wikipedia.org/wiki/Prince_George_Circuit', 1965, 3), (18, 'interlagos', 'Autódromo José Carlos Pace', 'São Paulo', 'Brazil', -23.7036, -46.6997, 785, 'http://en.wikipedia.org/wiki/Aut%C3%B3dromo_Jos%C3%A9_Carlos_Pace', 2024, 41), (52, 'tremblant', 'Circuit Mont-Tremblant', 'Quebec', 'Canada', 46.1877, -74.6099, 214, 'http://en.wikipedia.org/wiki/Circuit_Mont-Tremblant', 1970, 2), (16, 'fuji', 'Fuji Speedway', 'Oyama', 'Japan', 35.3717, 138.927, 583, 'http://en.wikipedia.org/wiki/Fuji_Speedway', 2008, 4), (76, 'mugello', 'Autodromo Internazionale del Mugello', 'Mugello', 'Italy', 43.9975, 11.3719, 255, 'http://en.wikipedia.org/wiki/Mugello_Circuit', 2020, 1);
-- DBMS: sqlite
CREATE TABLE drives (
    year INT,
    driver_id INT,
    drive_id ,
    constructor_id INT,
    first_round INT,
    last_round INT,
    is_first_drive_of_season ,
    is_final_drive_of_season 
);

INSERT INTO drives (year, driver_id, drive_id, constructor_id, first_round, last_round, is_first_drive_of_season, is_final_drive_of_season) VALUES (1968, 365, 1, 26, 8, 8, 1, 1), (1967, 351, 1, 193, 6, 6, 1, 1), (1958, 577, 1, 6, 1, 6, 1, 1), (2012, 813, 1, 3, 1, 20, 1, 1), (1994, 83, 1, 32, 1, 4, 1, 1);
-- DBMS: sqlite
CREATE TABLE drivers (
    driver_id INT(11),
    driver_ref VARCHAR(255),
    number INT(11),
    code VARCHAR(3),
    forename VARCHAR(255),
    surname VARCHAR(255),
    dob DATE,
    nationality VARCHAR(255),
    url VARCHAR(255)
);

INSERT INTO drivers (driver_id, driver_ref, number, code, forename, surname, dob, nationality, url) VALUES (596, 'elisian', NULL, NULL, 'Ed', 'Elisian', '1926-12-09', 'American', 'http://en.wikipedia.org/wiki/Ed_Elisian'), (686, 'reg_parnell', NULL, NULL, 'Reg', 'Parnell', '1911-07-02', 'British', 'http://en.wikipedia.org/wiki/Reg_Parnell'), (138, 'satoru_nakajima', NULL, NULL, 'Satoru', 'Nakajima', '1953-02-23', 'Japanese', 'http://en.wikipedia.org/wiki/Satoru_Nakajima'), (33, 'monteiro', NULL, 'TMO', 'Tiago', 'Monteiro', '1976-07-24', 'Portuguese', 'http://en.wikipedia.org/wiki/Tiago_Monteiro'), (597, 'connor', NULL, NULL, 'Pat', 'O''Connor', '1928-10-09', 'American', 'http://en.wikipedia.org/wiki/Pat_O%27Connor_(auto_racer)');
-- DBMS: sqlite
CREATE TABLE lap_times_ext (
    race_id INT,
    driver_id INT,
    lap INT,
    position INT,
    time TEXT,
    milliseconds INT,
    seconds REAL,
    running_milliseconds 
);

INSERT INTO lap_times_ext (race_id, driver_id, lap, position, time, milliseconds, seconds, running_milliseconds) VALUES (128, 18, 24, 5, '1:27.447', 87447, 87.447, 2020764), (227, 21, 11, 15, '1:25.271', 85271, 85.271, 955556), (222, 23, 17, 10, '1:42.367', 102367, 102.367, 1767924), (47, 3, 25, 8, '1:29.893', 89893, 89.893, 2280497), (8, 21, 58, 10, '1:22.934', 82934, 82.934, 4874669);
-- DBMS: sqlite
CREATE TABLE drivers_ext (
    driver_id INT,
    driver_ref TEXT,
    number INT,
    code ,
    forename TEXT,
    surname TEXT,
    full_name TEXT,
    dob NUM,
    nationality TEXT,
    url TEXT
);

INSERT INTO drivers_ext (driver_id, driver_ref, number, code, forename, surname, full_name, dob, nationality, url) VALUES (541, 'flockhart', NULL, 'FLO', 'Ron', 'Flockhart', 'Ron Flockhart', '1923-06-16', 'British', 'http://en.wikipedia.org/wiki/Ron_Flockhart_(auto_racing)'), (798, 'levrett', NULL, 'LEV', 'Bayliss', 'Levrett', 'Bayliss Levrett', '1914-02-14', 'American', 'http://en.wikipedia.org/wiki/Bayliss_Levrett'), (533, 'boyd', NULL, 'BOY', 'Johnny', 'Boyd', 'Johnny Boyd', '1926-08-19', 'American', 'http://en.wikipedia.org/wiki/Johnny_Boyd'), (718, 'loof', NULL, 'LOO', 'Ernst', 'Loof', 'Ernst Loof', '1907-07-04', 'German', 'http://en.wikipedia.org/wiki/Ernst_Loof'), (586, 'piotti', NULL, 'PIO', 'Luigi', 'Piotti', 'Luigi Piotti', '1913-10-27', 'Italian', 'http://en.wikipedia.org/wiki/Luigi_Piotti');
-- DBMS: sqlite
CREATE TABLE lap_times (
    race_id INT(11),
    driver_id INT(11),
    lap INT(11),
    position INT(11),
    time VARCHAR(255),
    milliseconds INT(11)
);

INSERT INTO lap_times (race_id, driver_id, lap, position, time, milliseconds) VALUES (949, 837, 46, 17, '1:37.077', 97077), (870, 20, 50, 4, '1:26.906', 86906), (122, 14, 20, 9, '1:14.275', 74275), (149, 31, 38, 3, '1:19.767', 79767), (119, 21, 12, 14, '3:07.051', 187051);
-- DBMS: sqlite
CREATE TABLE liveries (
    constructor_ref VARCHAR(255),
    start_year INT(11),
    end_year INT(11),
    primary_hex_code VARCHAR(255)
);

INSERT INTO liveries (constructor_ref, start_year, end_year, primary_hex_code) VALUES ('bmw_sauber', 2006, 2009, '#001473'), ('williams', 1985, 1989, '#101938'), ('renault', 2016, 2020, '#FFF500'), ('force_india', 2008, 2016, '#EB6F05'), ('lotus_f1', 2012, 2015, '#C1A43E');
-- DBMS: sqlite
CREATE TABLE driver_standings_ext (
    driver_standings_id INT,
    race_id INT,
    driver_id INT,
    points REAL,
    position INT,
    position_text TEXT,
    wins INT
);

INSERT INTO driver_standings_ext (driver_standings_id, race_id, driver_id, points, position, position_text, wins) VALUES (11149, 180, 55, 1.0, 15, '15', 0), (71900, 1099, 807, 0.0, 15, '15', 0), (22608, 481, 208, 0.0, 39, '39', 0), (43778, 828, 734, 2.0, 17, '17', 0), (58297, 557, 222, 46.0, 3, '3', 2);
-- DBMS: sqlite
CREATE TABLE constructor_standings (
    constructor_standings_id INT(11),
    race_id INT(11),
    constructor_id INT(11),
    points FLOAT,
    position INT(11),
    position_text VARCHAR(255),
    wins INT(11)
);

INSERT INTO constructor_standings (constructor_standings_id, race_id, constructor_id, points, position, position_text, wins) VALUES (17821, 772, 125, 0.0, 8, '8', 0), (28502, 1105, 1, 17.0, 6, '6', 0), (10790, 470, 56, 0.0, 14, '14', 0), (23149, 543, 57, 1.0, 6, '6', 0), (7788, 329, 35, 0.0, 14, '14', 0);
-- DBMS: sqlite
CREATE TABLE tdr_overrides (
    year INT(11),
    constructor_ref VARCHAR(255),
    driver_ref VARCHAR(255),
    team_driver_rank INT(11)
);

INSERT INTO tdr_overrides (year, constructor_ref, driver_ref, team_driver_rank) VALUES (2019, 'ferrari', 'leclerc', 2), (2016, 'red_bull', 'kvyat', 2), (2021, 'mclaren', 'ricciardo', 1), (2009, 'ferrari', 'massa', 1), (2018, 'haas', 'grosjean', 1);
-- DBMS: sqlite
CREATE TABLE pit_stops (
    race_id INT(11),
    driver_id INT(11),
    stop INT(11),
    lap INT(11),
    time TIME,
    duration VARCHAR(255),
    milliseconds INT(11)
);

INSERT INTO pit_stops (race_id, driver_id, stop, lap, time, duration, milliseconds) VALUES (863, 30, 1, 9, '15:19:05', '21.979', 21979), (966, 20, 1, 32, '13:49:30', '22.035', 22035), (1064, 847, 2, 68, '16:30:57', '25.533', 25533), (1073, 852, 2, 53, '18:24:01', '21.909', 21909), (851, 10, 3, 53, '15:30:17', '20.929', 20929);
-- DBMS: sqlite
CREATE TABLE team_driver_ranks (
    year INT,
    constructor_id INT,
    constructor_ref TEXT,
    driver_id INT,
    driver_ref TEXT,
    team_driver_rank 
);

INSERT INTO team_driver_ranks (year, constructor_id, constructor_ref, driver_id, driver_ref, team_driver_rank) VALUES (1992, 35, 'dallara', 94, 'martini', 1), (1980, 3, 'williams', 199, 'reutemann', 2), (1952, 144, 'veritas', 724, 'ulmen', 2), (1992, 37, 'march', 125, 'naspetti', 3), (1982, 32, 'team_lotus', 90, 'moreno', 4);
-- DBMS: sqlite
CREATE TABLE seasons (
    year INT(11),
    url VARCHAR(255)
);

INSERT INTO seasons (year, url) VALUES (2005, 'http://en.wikipedia.org/wiki/2005_Formula_One_season'), (1983, 'http://en.wikipedia.org/wiki/1983_Formula_One_season'), (1988, 'http://en.wikipedia.org/wiki/1988_Formula_One_season'), (1980, 'http://en.wikipedia.org/wiki/1980_Formula_One_season'), (1970, 'http://en.wikipedia.org/wiki/1970_Formula_One_season');
-- DBMS: sqlite
CREATE TABLE driver_standings (
    driver_standings_id INT(11),
    race_id INT(11),
    driver_id INT(11),
    points FLOAT,
    position INT(11),
    position_text VARCHAR(255),
    wins INT(11)
);

INSERT INTO driver_standings (driver_standings_id, race_id, driver_id, points, position, position_text, wins) VALUES (51291, 705, 304, 5.0, 10, '10', 0), (19122, 376, 119, 1.0, 13, '13', 0), (10858, 216, 35, 43.0, 2, '2', 4), (19505, 388, 138, 0.0, 7, '7', 0), (10428, 249, 96, 2.0, 14, '14', 0);
-- DBMS: sqlite
CREATE TABLE lap_time_stats (
    race_id INT,
    driver_id INT,
    avg_milliseconds ,
    avg_seconds ,
    stdev_milliseconds ,
    stdev_seconds 
);

INSERT INTO lap_time_stats (race_id, driver_id, avg_milliseconds, avg_seconds, stdev_milliseconds, stdev_seconds) VALUES (141, 56, 105208.0350877193, 105.2080350877193, 22246.99046941265, 22.246990469412648), (170, 15, 148893.25, 148.89325000000002, 35735.79552336145, 35.735795523361446), (1131, 847, 71307.01408450704, 71.30701408450706, 3408.3033716265727, 3.4083033716265736), (93, 30, 83543.06451612903, 83.54306451612906, 4386.384758990276, 4.386384758990276), (936, 20, 92318.62318840579, 92.31862318840581, 14240.878505613206, 14.240878505613205);
-- DBMS: sqlite
CREATE TABLE olist_sellers (
    seller_id TEXT,
    seller_zip_code_prefix BIGINT,
    seller_city TEXT,
    seller_state TEXT
);

INSERT INTO olist_sellers (seller_id, seller_zip_code_prefix, seller_city, seller_state) VALUES ('880eda903e719a5f179f7e9fceb3a69d', 14610, 'ipua', 'SP'), ('da8622b14eb17ae2831f4ac5b9dab84a', 13405, 'piracicaba', 'SP'), ('762ed976527cddf02787edba70fffa2a', 86026, 'londrina', 'PR'), ('0176f73cc1195f367f7b32db1e5b3aa8', 14940, 'ibitinga', 'SP'), ('3ab971ce71839580d2ae5b4e40fe8044', 3210, 'sao paulo', 'SP');
-- DBMS: sqlite
CREATE TABLE olist_order_payments (
    order_id TEXT,
    payment_sequential BIGINT,
    payment_type TEXT,
    payment_installments BIGINT,
    payment_value FLOAT
);

INSERT INTO olist_order_payments (order_id, payment_sequential, payment_type, payment_installments, payment_value) VALUES ('bd948f34444b602f314108a393c1f49e', 1, 'credit_card', 8, 178.27), ('81e4aef5d8ad9005b1295fcc2fb4100a', 1, 'credit_card', 5, 107.78), ('8d3bd6e846b52be957466e9e1f8f642d', 1, 'credit_card', 3, 39.1), ('851edd7bad3021e86dd7fa72e9a5688a', 1, 'debit_card', 1, 165.48), ('98851e1a5afa44197e521fc8656fa598', 1, 'credit_card', 2, 201.84);
-- DBMS: sqlite
CREATE TABLE olist_order_reviews (
    review_id TEXT,
    order_id TEXT,
    review_score BIGINT,
    review_comment_title TEXT,
    review_comment_message TEXT,
    review_creation_date TEXT,
    review_answer_timestamp TEXT
);

INSERT INTO olist_order_reviews (review_id, order_id, review_score, review_comment_title, review_comment_message, review_creation_date, review_answer_timestamp) VALUES ('48d5ecbd8f58a59125aec500070293f3', '9db3045b1374d5f2d301c412081ab1ee', 1, NULL, 'Carteira maior do que as grandes normal muito feia$60 perdido.', '2018-03-21 00:00:00', '2018-03-22 09:55:02'), ('53903d353f285032e3e7407a886614f4', 'aaeb782b2c3417edea48a095560116d3', 3, NULL, NULL, '2018-08-23 00:00:00', '2018-08-24 01:40:36'), ('e389043813641e34886fa23ae75b748a', '7525729ed75b4d65c84bf8499bef7df2', 3, NULL, NULL, '2017-04-01 00:00:00', '2017-04-01 09:14:11'), ('f7e26885499adfbc691b262a86f271c1', '0b5680deaa067376ba987f02b755e8bd', 4, NULL, NULL, '2018-08-25 00:00:00', '2018-08-25 18:53:38'), ('8a17bc51716ccc6645046300456cdb84', 'adb1bc335d8e615c7fb377e515a19d8e', 3, NULL, NULL, '2017-06-06 00:00:00', '2017-06-06 16:48:58');
-- DBMS: sqlite
CREATE TABLE olist_products (
    product_id TEXT,
    product_category_name TEXT,
    product_name_lenght FLOAT,
    product_description_lenght FLOAT,
    product_photos_qty FLOAT,
    product_weight_g FLOAT,
    product_length_cm FLOAT,
    product_height_cm FLOAT,
    product_width_cm FLOAT
);

INSERT INTO olist_products (product_id, product_category_name, product_name_lenght, product_description_lenght, product_photos_qty, product_weight_g, product_length_cm, product_height_cm, product_width_cm) VALUES ('1585efae0c3719cefae4c6b411f07fb6', 'moveis_sala', 60.0, 650.0, 1.0, 400.0, 32.0, 29.0, 15.0), ('c2bd03501cf7f4f3a1201e6069155bc0', 'moveis_decoracao', 55.0, 133.0, 1.0, 900.0, 35.0, 4.0, 30.0), ('7e34dea6bf1b26c294d48bfc3fa41d9e', 'fashion_underwear_e_moda_praia', 63.0, 3140.0, 11.0, 400.0, 16.0, 5.0, 11.0), ('4e4533c3f5832b58737e5a6229fe39f5', 'cama_mesa_banho', 54.0, 515.0, 1.0, 1000.0, 16.0, 10.0, 16.0), ('ec1a2701e8f1d9d8703e876f5c0342d4', 'cama_mesa_banho', 57.0, 665.0, 1.0, 3600.0, 34.0, 8.0, 38.0);
-- DBMS: sqlite
CREATE TABLE olist_orders (
    order_id TEXT,
    customer_id TEXT,
    order_status TEXT,
    order_purchase_timestamp TEXT,
    order_approved_at TEXT,
    order_delivered_carrier_date TEXT,
    order_delivered_customer_date TEXT,
    order_estimated_delivery_date TEXT
);

INSERT INTO olist_orders (order_id, customer_id, order_status, order_purchase_timestamp, order_approved_at, order_delivered_carrier_date, order_delivered_customer_date, order_estimated_delivery_date) VALUES ('771d515757315655434c93d52615af6d', '63acf2ff67f7e843a45a2201eb7bd925', 'delivered', '2017-05-24 22:37:32', '2017-05-24 22:45:18', '2017-05-25 09:27:11', '2017-06-01 13:15:43', '2017-06-27 00:00:00'), ('e75011be2ec3dec23d2ed6757d35c792', '7dec82bd3f93ed6107cb7bc7e2242618', 'delivered', '2017-01-19 14:38:27', '2017-01-19 14:50:07', '2017-01-20 14:12:55', '2017-01-23 12:38:48', '2017-02-27 00:00:00'), ('eef06779a3b6d4c50bb9dd92796a9782', '1e26d5d9c7f4fea38f023d1cd7e7f0ee', 'delivered', '2017-09-08 08:08:56', '2017-09-08 08:24:26', '2017-09-08 18:33:14', '2017-09-11 20:50:01', '2017-09-20 00:00:00'), ('59fe3d09426ad8ab2704c83289504020', 'f76262103d732ab3dc351f36b1cf976c', 'shipped', '2018-02-22 18:12:40', '2018-02-22 18:47:35', '2018-02-26 20:33:41', NULL, '2018-03-22 00:00:00'), ('0c66805964db8d43c1c81402e3433f9b', '629037360cb6212f9a8831b62ee1a4b8', 'delivered', '2018-06-02 20:57:36', '2018-06-04 09:51:35', '2018-06-05 07:52:00', '2018-06-19 20:48:46', '2018-07-11 00:00:00');
-- DBMS: sqlite
CREATE TABLE product_category_name_translation (
    product_category_name TEXT,
    product_category_name_english TEXT
);

INSERT INTO product_category_name_translation (product_category_name, product_category_name_english) VALUES ('moveis_quarto', 'furniture_bedroom'), ('flores', 'flowers'), ('seguros_e_servicos', 'security_and_services'), ('construcao_ferramentas_jardim', 'costruction_tools_garden'), ('audio', 'audio');
-- DBMS: sqlite
CREATE TABLE olist_customers (
    customer_id TEXT,
    customer_unique_id TEXT,
    customer_zip_code_prefix BIGINT,
    customer_city TEXT,
    customer_state TEXT
);

INSERT INTO olist_customers (customer_id, customer_unique_id, customer_zip_code_prefix, customer_city, customer_state) VALUES ('00ee00c99d468f838abf1d6d7044b2aa', '6287730d8268264d1ac736b64304c632', 6709, 'cotia', 'SP'), ('c6f030c1e7bc3a6128a1e1fa50bee5e4', '7072c171580854d05ed07505e950d0de', 4130, 'sao paulo', 'SP'), ('d6d2c18db765ea84370d9b33b9e3a006', '87ae416cba4fb79b69033a4fbe1769aa', 29171, 'serra', 'ES'), ('5a2e16b4fd69014e83f7fc6de7e5cc20', 'd931982691b925ca8f626c20efa90743', 66050, 'belem', 'PA'), ('0e24c20739fc582fda3306fc43683aa1', '8cfc5350efe3bce6a0d6f96fbaf2c3b4', 35530, 'claudio', 'MG');
-- DBMS: sqlite
CREATE TABLE olist_geolocation (
    geolocation_zip_code_prefix BIGINT,
    geolocation_lat FLOAT,
    geolocation_lng FLOAT,
    geolocation_city TEXT,
    geolocation_state TEXT
);

INSERT INTO olist_geolocation (geolocation_zip_code_prefix, geolocation_lat, geolocation_lng, geolocation_city, geolocation_state) VALUES (46430, -14.237159781997182, -42.76479735002856, 'guanambi', 'BA'), (5886, -23.67708961348357, -46.78918112074298, 'sao paulo', 'SP'), (90040, -30.04135756287144, -51.2109162979399, 'porto alegre', 'RS'), (14022, -21.22819090293543, -47.78970290861125, 'ribeirao preto', 'SP'), (21340, -22.8691532828207, -43.352440814617, 'rio de janeiro', 'RJ');
-- DBMS: sqlite
CREATE TABLE olist_order_items (
    order_id TEXT,
    order_item_id BIGINT,
    product_id TEXT,
    seller_id TEXT,
    shipping_limit_date TEXT,
    price FLOAT,
    freight_value FLOAT
);

INSERT INTO olist_order_items (order_id, order_item_id, product_id, seller_id, shipping_limit_date, price, freight_value) VALUES ('e3ca8512cce88f749da2df4e25e22b03', 1, '2136c70bbe723d338fab53da3c03e6dc', '6560211a19b47992c3666cc44a7e94c0', '2017-11-23 15:50:34', 29.0, 16.79), ('c96496058fe55b7e844cd5e3a2562f85', 2, '9d717f96236e39a3dbe6326b9d51d681', 'bbd3acfe6de99892e73940d3fdceaf68', '2018-08-27 10:51:04', 31.0, 16.12), ('6ecf1a4051b4c5ed613624b460970a26', 1, '26644690fde745fc4654719c3904e1db', '1835b56ce799e6a4dc4eddc053f04066', '2017-11-23 08:55:48', 80.0, 12.06), ('4aed2e7583609a6a24a9fb2c7b6403f2', 1, '5d66715cc928aadd0074f61332698593', '128639473a139ac0f3e5f5ade55873a5', '2018-01-11 08:31:44', 19.9, 16.79), ('0ec392fc56b5d2e7e4279c19c51b6460', 1, 'da2666768ebe6384813349f02ca0ea28', 'ed4acab38528488b65a9a9c603ff024a', '2017-07-12 01:23:33', 112.99, 14.54);
-- DBMS: sqlite
CREATE TABLE olist_products_dataset (
    index BIGINT,
    product_id TEXT,
    product_category_name TEXT,
    product_name_lenght FLOAT,
    product_description_lenght FLOAT,
    product_photos_qty FLOAT,
    product_weight_g FLOAT,
    product_length_cm FLOAT,
    product_height_cm FLOAT,
    product_width_cm FLOAT
);

INSERT INTO olist_products_dataset (index, product_id, product_category_name, product_name_lenght, product_description_lenght, product_photos_qty, product_weight_g, product_length_cm, product_height_cm, product_width_cm) VALUES (20088, '32c6fb2c7b8966ea413c684eb15186f5', 'esporte_lazer', 60.0, 580.0, 6.0, 400.0, 30.0, 16.0, 16.0), (27077, 'cd26cd11a73559a0b65964c1324a688d', 'dvds_blu_ray', 48.0, 2433.0, 1.0, 800.0, 26.0, 15.0, 20.0), (9559, 'e7bbc0d43d1f5cb09bab95b664236633', 'informatica_acessorios', 38.0, 716.0, 3.0, 833.0, 19.0, 12.0, 17.0), (10889, '1b1c78225aa5601414a8c09020ee1803', 'ferramentas_jardim', 27.0, 375.0, 2.0, 200.0, 16.0, 14.0, 14.0), (10993, '6ec26b3516fecd18cda3001a9c48a242', 'beleza_saude', 60.0, 918.0, 1.0, 100.0, 22.0, 3.0, 15.0);
-- DBMS: sqlite
CREATE TABLE movies (
    id TEXT,
    title TEXT,
    year INTEGER,
    date_published TIMESTAMP,
    duration INTEGER,
    country TEXT,
    worlwide_gross_income TEXT,
    languages TEXT,
    production_company TEXT
);

INSERT INTO movies (id, title, year, date_published, duration, country, worlwide_gross_income, languages, production_company) VALUES ('tt7477068', 'Der Trafikant', 2018, '2018-11-01 00:00:00', 117, 'Austria, Germany', '$ 360996', 'German, Czech', 'Epo-Film Produktionsgesellschaft'), ('tt7222598', 'Raju Kannada Medium', 2018, '2018-01-19 00:00:00', 159, 'India', NULL, 'Kannada', 'Suresh Arts'), ('tt5885106', 'Vengeance', 2018, '2018-09-28 00:00:00', 92, 'UK', NULL, 'English', 'Evolutionary Films'), ('tt8054150', 'O chyom govoryat muzhchiny. Prodolzhenie', 2018, '2018-02-22 00:00:00', 99, 'Russia', '$ 7035897', 'Russian', NULL), ('tt5887650', 'Living Space', 2018, '2018-03-10 00:00:00', 80, 'Australia', NULL, 'English', 'Tru Dot Films');
-- DBMS: sqlite
CREATE TABLE director_mapping (
    movie_id TEXT,
    name_id TEXT
);

INSERT INTO director_mapping (movie_id, name_id) VALUES ('tt6892250', 'nm8994803'), ('tt8396120', 'nm9412189'), ('tt6138688', 'nm1618536'), ('tt7382828', 'nm1671980'), ('tt4161376', 'nm10150409');
-- DBMS: sqlite
CREATE TABLE ERD (
    table TEXT,
    column TEXT,
    Unnamed: 2 REAL,
    Unnamed: 3 REAL,
    Unnamed: 4 REAL,
    Unnamed: 5 REAL,
    Unnamed: 6 TEXT,
    Unnamed: 7 REAL,
    Unnamed: 8 REAL,
    Unnamed: 9 TEXT,
    Unnamed: 10 REAL,
    Unnamed: 11 REAL,
    Unnamed: 12 TEXT
);

INSERT INTO ERD (table, column, Unnamed: 2, Unnamed: 3, Unnamed: 4, Unnamed: 5, Unnamed: 6, Unnamed: 7, Unnamed: 8, Unnamed: 9, Unnamed: 10, Unnamed: 11, Unnamed: 12) VALUES ('director_mapping', 'name_id', NULL, NULL, NULL, NULL, 'role_mapping', NULL, NULL, 'duration', NULL, NULL, 'director_mapping'), ('movie', 'languages', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'movie', NULL, NULL, NULL), ('names', 'known_for_movies', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'name', NULL, NULL, NULL), ('genre', 'genre', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'year', NULL, NULL, NULL), ('movie', 'worlwide_gross_income', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-- DBMS: sqlite
CREATE TABLE ratings (
    movie_id TEXT,
    avg_rating REAL,
    total_votes INTEGER,
    median_rating REAL
);

INSERT INTO ratings (movie_id, avg_rating, total_votes, median_rating) VALUES ('tt3923004', 3.7, 1719, 6.0), ('tt6424724', 6.7, 128, 7.0), ('tt8304386', 4.0, 688, 3.0), ('tt6619250', 3.1, 137, 4.0), ('tt7999950', 7.2, 282, 7.0);
-- DBMS: sqlite
CREATE TABLE names (
    id TEXT,
    name TEXT,
    height REAL,
    date_of_birth TEXT,
    known_for_movies TEXT
);

INSERT INTO names (id, name, height, date_of_birth, known_for_movies) VALUES ('nm0005405', 'Seann William Scott', 180.0, '1976-10-03', NULL), ('nm5125871', 'DeRon Horton', 200.0, NULL, 'tt5826432'), ('nm5587544', 'Shane Wheeler', nan, NULL, NULL), ('nm6680947', 'Nhung Trang', nan, NULL, NULL), ('nm7779129', 'Nikita Dyuvbanov', nan, NULL, 'tt7025388,tt5629524,tt5242684');
-- DBMS: sqlite
CREATE TABLE role_mapping (
    movie_id TEXT,
    name_id TEXT,
    category TEXT
);

INSERT INTO role_mapping (movie_id, name_id, category) VALUES ('tt7219324', 'nm0038449', 'actress'), ('tt2898904', 'nm4666860', 'actor'), ('tt3809960', 'nm0957257', 'actor'), ('tt8665794', 'nm3354073', 'actor'), ('tt5897636', 'nm4264236', 'actress');
-- DBMS: sqlite
CREATE TABLE pizza_get_extras (
    row_id INTEGER,
    order_id INTEGER,
    extras INTEGER,
    extras_count INTEGER
);

INSERT INTO pizza_get_extras (row_id, order_id, extras, extras_count) VALUES (2, 9, 5, 2), (1, 5, 1, 1), (1, 10, 1, 2), (1, 9, 1, 2), (2, 10, 4, 2);
-- DBMS: sqlite
CREATE TABLE pizza_get_exclusions (
    row_id INTEGER,
    order_id INTEGER,
    exclusions INTEGER,
    total_exclusions INTEGER
);

INSERT INTO pizza_get_exclusions (row_id, order_id, exclusions, total_exclusions) VALUES (1, 4, 4, 3), (1, 9, 4, 1), (1, 10, 2, 2), (2, 10, 6, 2);
-- DBMS: sqlite
CREATE TABLE pizza_customer_orders (
    order_id INTEGER,
    customer_id INTEGER,
    pizza_id INTEGER,
    exclusions TEXT,
    extras TEXT,
    order_time TEXT
);

INSERT INTO pizza_customer_orders (order_id, customer_id, pizza_id, exclusions, extras, order_time) VALUES (4, 103, 1, '4', NULL, '2021-01-04 13:23:46'), (3, 102, 1, NULL, NULL, '2021-01-02 23:51:23'), (9, 103, 1, '4', '1,5', '2021-01-10 11:22:59'), (7, 105, 2, NULL, '1', '2021-01-08 21:20:29'), (1, 101, 1, NULL, NULL, '2021-01-01 18:05:02');
-- DBMS: sqlite
CREATE TABLE statistics (
    date TEXT,
    state TEXT,
    total_cases INTEGER,
    total_deaths INTEGER
);

INSERT INTO statistics (date, state, total_cases, total_deaths) VALUES ('2020-02-29 00:00:00', 'MA', 1, 0), ('2020-09-24 00:00:00', 'MA', 136759, 9358), ('2020-02-03 00:00:00', 'MA', 1, 0), ('2020-06-10 00:00:00', 'NC', 38171, 1053), ('2020-08-23 00:00:00', 'NC', 155113, 2531);
-- DBMS: sqlite
CREATE TABLE income_trees (
    zipcode INTEGER,
    Estimate_Total INTEGER,
    Margin_of_Error_Total INTEGER,
    Estimate_Median_income INTEGER,
    Margin_of_Error_Median_income INTEGER,
    Estimate_Mean_income INTEGER,
    Margin_of_Error_Mean_income INTEGER
);

INSERT INTO income_trees (zipcode, Estimate_Total, Margin_of_Error_Total, Estimate_Median_income, Margin_of_Error_Median_income, Estimate_Mean_income, Margin_of_Error_Mean_income) VALUES (10011, 29762, 985, 109818, 7540, 196817, 12211), (10154, 0, 11, 0, 0, 0, 0), (10199, 0, 11, 0, 0, 0, 0), (11415, 8250, 309, 63756, 3129, 80334, 3946), (11229, 30764, 526, 52168, 1953, 71111, 2025);
-- DBMS: sqlite
CREATE TABLE pizza_runner_orders (
    order_id INTEGER,
    runner_id INTEGER,
    pickup_time TEXT,
    distance TEXT,
    duration TEXT,
    cancellation TEXT
);

INSERT INTO pizza_runner_orders (order_id, runner_id, pickup_time, distance, duration, cancellation) VALUES (5, 3, '2021-01-08 21:10:57', '10', '15', NULL), (2, 1, '2021-01-01 19:10:54', '20km', '27 minutes', NULL), (7, 2, '2021-01-08 21:30:45', '25km', '25mins', NULL), (3, 1, '2021-01-03 00:12:37', '13.4km', '20 mins', NULL), (8, 2, '2021-01-10 00:15:02', '23.4 km', '15 minute', NULL);
-- DBMS: sqlite
CREATE TABLE companies_funding (
    company_id INTEGER,
    valuation INTEGER,
    funding INTEGER,
    select_investors TEXT
);

INSERT INTO companies_funding (company_id, valuation, funding, select_investors) VALUES (692, 1000000000, 532000000, '"Orange Digital Ventures, Access Industries"'), (460, 2000000000, 624000000, 'Carsales'), (1059, 1000000000, 70000000, '"Kleiner Perkins Caufield & Byers, Sequoia Capital"'), (921, 1000000000, 283000000, '"IDG Capital, Northern Light Venture Capital, DCM Ventures"'), (298, 3000000000, 468000000, '"Makers Fund, Index Ventures, Inova Ventures Participacees"');
-- DBMS: sqlite
CREATE TABLE trees (
    idx INTEGER,
    tree_id INTEGER,
    tree_dbh INTEGER,
    stump_diam INTEGER,
    status TEXT,
    health TEXT,
    spc_latin TEXT,
    spc_common TEXT,
    address TEXT,
    zipcode INTEGER,
    borocode INTEGER,
    boroname TEXT,
    nta_name TEXT,
    state TEXT,
    latitude REAL,
    longitude REAL
);

INSERT INTO trees (idx, tree_id, tree_dbh, stump_diam, status, health, spc_latin, spc_common, address, zipcode, borocode, boroname, nta_name, state, latitude, longitude) VALUES (66018, 271911, 24, 0, 'Alive', 'Good', 'Quercus palustris', 'pin oak', '1133 MORRISON AVENUE', 10472, 2, 'Bronx', 'Soundview-Bruckner', 'New York', 40.82736413, -73.87388805), (287679, 468186, 15, 0, 'Alive', 'Good', 'Platanus x acerifolia', 'London planetree', '1167 GRENADA PLACE', 10466, 2, 'Bronx', 'Woodlawn-Wakefield', 'New York', 40.88831254, -73.84374846), (489391, 672543, 8, 0, 'Alive', 'Good', 'Gleditsia triacanthos var. inermis', 'honeylocust', '211-003 33 AVENUE', 11361, 4, 'Queens', 'Bayside-Bayside Hills', 'New York', 40.77160029, -73.77709877), (294417, 495771, 15, 0, 'Alive', 'Good', 'Liquidambar styraciflua', 'sweetgum', '235 WOODWARD AVENUE', 10314, 5, 'Staten Island', 'New Springville-Bloomfield-Travis', 'New York', 40.60514065, -74.14289682), (572568, 56194, 2, 0, 'Alive', 'Good', 'Cercidiphyllum japonicum', 'katsura tree', '439 LIBERTY AVENUE', 11207, 3, 'Brooklyn', 'East New York', 'New York', 40.67495247, -73.89376165);
-- DBMS: sqlite
CREATE TABLE companies_dates (
    company_id INTEGER,
    date_joined TEXT,
    year_founded INTEGER
);

INSERT INTO companies_dates (company_id, date_joined, year_founded) VALUES (545, '2020-01-21T00:00:00.000', 2011), (490, '2020-02-11T00:00:00.000', 2010), (890, '2021-07-14T00:00:00.000', 2012), (817, '2021-05-04T00:00:00.000', 2014), (673, '2021-01-19T00:00:00.000', 2016);
-- DBMS: sqlite
CREATE TABLE pizza_clean_runner_orders (
    order_id INTEGER,
    runner_id INTEGER,
    pickup_time TEXT,
    distance REAL,
    duration REAL,
    cancellation TEXT
);

INSERT INTO pizza_clean_runner_orders (order_id, runner_id, pickup_time, distance, duration, cancellation) VALUES (7, 2, '2021-01-08 21:30:45', 25.0, 25.0, NULL), (10, 1, '2021-01-11 18:50:20', 10.0, 10.0, NULL), (2, 1, '2021-01-01 19:10:54', 20.0, 27.0, NULL), (6, 3, NULL, 0.0, 0.0, 'Restaurant Cancellation'), (8, 2, '2021-01-10 00:15:02', 23.4, 15.0, NULL);
-- DBMS: sqlite
CREATE TABLE pizza_clean_customer_orders (
    order_id INTEGER,
    customer_id INTEGER,
    pizza_id INTEGER,
    exclusions TEXT,
    extras TEXT,
    order_time TEXT
);

INSERT INTO pizza_clean_customer_orders (order_id, customer_id, pizza_id, exclusions, extras, order_time) VALUES (3, 102, 2, NULL, NULL, '2021-01-02 23:51:23'), (7, 105, 2, NULL, '1', '2021-01-08 21:20:29'), (9, 103, 1, '4', '1,5', '2021-01-10 11:22:59'), (4, 103, 1, '4', NULL, '2021-01-04 13:23:46'), (5, 104, 1, NULL, '1', '2021-01-08 21:00:29');
-- DBMS: sqlite
CREATE TABLE seats (
    aircraft_code character(3),
    seat_no character varying(4),
    fare_conditions character varying(10)
);

INSERT INTO seats (aircraft_code, seat_no, fare_conditions) VALUES ('SU9', '1F', 'Business'), ('763', '28B', 'Economy'), ('773', '41C', 'Economy'), ('773', '14A', 'Comfort'), ('763', '38A', 'Economy');
-- DBMS: sqlite
CREATE TABLE airports_data (
    airport_code character(3),
    airport_name jsonb,
    city jsonb,
    coordinates point,
    timezone TEXT
);

INSERT INTO airports_data (airport_code, airport_name, city, coordinates, timezone) VALUES ('ESL', '{"en": "Elista Airport", "ru": "Элиста"}', '{"en": "Elista", "ru": "Элиста"}', '(44.3308982849121094,46.3739013671875)', 'Europe/Moscow'), ('KGP', '{"en": "Kogalym International Airport", "ru": "Когалым"}', '{"en": "Kogalym", "ru": "Когалым"}', '(74.5337982177734375,62.190399169921875)', 'Asia/Yekaterinburg'), ('UFA', '{"en": "Ufa International Airport", "ru": "Уфа"}', '{"en": "Ufa", "ru": "Уфа"}', '(55.8744010925289984,54.5574989318850001)', 'Asia/Yekaterinburg'), ('GOJ', '{"en": "Nizhny Novgorod Strigino International Airport", "ru": "Стригино"}', '{"en": "Nizhniy Novgorod", "ru": "Нижний Новгород"}', '(43.7840003967289988,56.2300987243649999)', 'Europe/Moscow'), ('UUS', '{"en": "Yuzhno-Sakhalinsk Airport", "ru": "Хомутово"}', '{"en": "Yuzhno-Sakhalinsk", "ru": "Южно-Сахалинск"}', '(142.718002319335938,46.8886985778808594)', 'Asia/Sakhalin');
-- DBMS: sqlite
CREATE TABLE bookings (
    book_ref character(6),
    book_date timestamp with time zone,
    total_amount numeric(10,2)
);

INSERT INTO bookings (book_ref, book_date, total_amount) VALUES ('190B1D', '2017-08-12 12:22:00+03', 36600), ('E7232E', '2017-08-03 02:12:00+03', 56000), ('C2A4B7', '2017-07-15 01:42:00+03', 23200), ('A500EF', '2017-07-08 11:00:00+03', 47600), ('B87E08', '2017-08-01 12:26:00+03', 70800);
-- DBMS: sqlite
CREATE TABLE aircrafts_data (
    aircraft_code character(3),
    model jsonb,
    range INTEGER
);

INSERT INTO aircrafts_data (aircraft_code, model, range) VALUES ('319', '{"en": "Airbus A319-100", "ru": "Аэробус A319-100"}', 6700), ('321', '{"en": "Airbus A321-200", "ru": "Аэробус A321-200"}', 5600), ('CR2', '{"en": "Bombardier CRJ-200", "ru": "Бомбардье CRJ-200"}', 2700), ('320', '{"en": "Airbus A320-200", "ru": "Аэробус A320-200"}', 5700), ('CN1', '{"en": "Cessna 208 Caravan", "ru": "Сессна 208 Караван"}', 1200);
-- DBMS: sqlite
CREATE TABLE flights (
    flight_id INTEGER,
    flight_no character(6),
    scheduled_departure timestamp with time zone,
    scheduled_arrival timestamp with time zone,
    departure_airport character(3),
    arrival_airport character(3),
    status character varying(20),
    aircraft_code character(3),
    actual_departure timestamp with time zone,
    actual_arrival timestamp with time zone
);

INSERT INTO flights (flight_id, flight_no, scheduled_departure, scheduled_arrival, departure_airport, arrival_airport, status, aircraft_code, actual_departure, actual_arrival) VALUES (28201, 'PG0032', '2017-08-12 09:00:00+03', '2017-08-12 10:45:00+03', 'PEZ', 'DME', 'Arrived', 'CN1', '2017-08-12 09:04:00+03', '2017-08-12 10:50:00+03'), (8942, 'PG0439', '2017-08-23 12:55:00+03', '2017-08-23 16:20:00+03', 'LED', 'TBW', 'Scheduled', 'CN1', '\N', '\N'), (17756, 'PG0349', '2017-08-17 07:15:00+03', '2017-08-17 09:05:00+03', 'OSW', 'HMA', 'Scheduled', 'CR2', '\N', '\N'), (11014, 'PG0588', '2017-09-03 08:50:00+03', '2017-09-03 09:15:00+03', 'SVX', 'PEE', 'Scheduled', 'SU9', '\N', '\N'), (5888, 'PG0496', '2017-08-24 12:45:00+03', '2017-08-24 14:55:00+03', 'SVO', 'JOK', 'Scheduled', 'CN1', '\N', '\N');
-- DBMS: sqlite
CREATE TABLE boarding_passes (
    ticket_no character(13),
    flight_id INTEGER,
    boarding_no INTEGER,
    seat_no character varying(4)
);

INSERT INTO boarding_passes (ticket_no, flight_id, boarding_no, seat_no) VALUES ('0005433922545', 24122, 60, '15F'), ('0005433568978', 324, 48, '13A'), ('0005435213164', 30586, 61, '17E'), ('0005434163641', 25246, 124, '27F'), ('0005435126194', 31908, 23, '15C');
-- DBMS: sqlite
CREATE TABLE tickets (
    ticket_no character(13),
    book_ref character(6),
    passenger_id character varying(20)
);

INSERT INTO tickets (ticket_no, book_ref, passenger_id) VALUES ('0005432383693', '1EE239', '8882 721205'), ('0005432646309', '022379', '7401 627389'), ('0005435097436', '0ED676', '1181 314874'), ('0005433923964', 'D68325', '2076 240051'), ('0005433784739', '972937', '0556 016120');
-- DBMS: sqlite
CREATE TABLE ticket_flights (
    ticket_no character(13),
    flight_id INTEGER,
    fare_conditions character varying(10),
    amount numeric(10,2)
);

INSERT INTO ticket_flights (ticket_no, flight_id, fare_conditions, amount) VALUES ('0005435706759', 2459, 'Business', 86800), ('0005434879825', 14606, 'Economy', 16600), ('0005435718911', 15313, 'Economy', 9000), ('0005434908381', 25837, 'Economy', 6300), ('0005435824987', 1304, 'Economy', 66600);