CREATE TABLE ev_population (
    vin VARCHAR(10), 
    county VARCHAR(20), 
    city VARCHAR(24), 
    state VARCHAR(2), 
    postal_code INTEGER, 
    model_year INTEGER, 
    make VARCHAR(20), 
    model VARCHAR(24), 
    ev_type VARCHAR(38), 
    cafv_eligibility VARCHAR(60), 
    electric_range INTEGER, 
    base_msrp INTEGER, 
    legislative_district INTEGER, 
    dol_vehicle_id INTEGER, 
    electric_utility VARCHAR(112)
);

CREATE TABLE county_registrations (
    month VARCHAR(9),
    year INTEGER,
    county VARCHAR(20), 
    state VARCHAR(2), 
    primary_use VARCHAR(9), 
    battery_evs INTEGER, 
    plug_in_hybrids INTEGER, 
    total_evs INTEGER, 
    total_non_evs INTEGER, 
    total_vehicles INTEGER, 
    percent_evs REAL
);

CREATE TABLE ev_registrations (
    ev_type VARCHAR(38), 
    vin VARCHAR(10), 
    dol_vehicle_id INTEGER, 
    model_year INTEGER, 
    make VARCHAR(20), 
    model VARCHAR(24), 
    primary_use VARCHAR(34), 
    electric_range INTEGER, 
    odometer_reading INTEGER, 
    odometer_reading_description VARCHAR(55), 
    new_or_used VARCHAR(4), 
    sale_price INTEGER, 
    base_msrp INTEGER, 
    transaction_type VARCHAR(32), 
    transaction_month VARCHAR(9),
    transaction_day INTEGER,
    transaction_year INTEGER,
    county VARCHAR(20), 
    city VARCHAR(24), 
    state VARCHAR(2), 
    postal_code INTEGER, 
    cafv_eligibility VARCHAR(40), 
    meets_2019_hb_2042_electric_range_requirement BOOLEAN, 
    meets_2019_hb_2042_sale_date_requirement BOOLEAN, 
    meets_2019_hb_2042_sale_price_value_requirement BOOLEAN, 
    battery_range_requirement_2019_hb_2042 VARCHAR(32), 
    purchase_date_requirement_2019_hb_2042 VARCHAR(59), 
    sale_price_value_requirement_2019_hb_2042 VARCHAR(59), 
    ev_fee_paid VARCHAR(14), 
    transportation_electrification_fee_paid VARCHAR(14), 
    hybrid_vehicle_electrificatin_fee_paid VARCHAR(14), 
    geoid_2020 INTEGER, 
    legislative_district INTEGER, 
    electric_utility VARCHAR(112)
);
