CREATE OR REPLACE TABLE voters(county_id VARCHAR, county_desc VARCHAR, voter_reg_num VARCHAR, ncid VARCHAR, last_name VARCHAR, first_name VARCHAR, middle_name VARCHAR, name_suffix_lbl VARCHAR, status_cd VARCHAR, voter_status_desc VARCHAR, reason_cd VARCHAR, voter_status_reason_desc VARCHAR, res_street_address VARCHAR, res_city_desc VARCHAR, state_cd VARCHAR, zip_code VARCHAR, mail_addr1 VARCHAR, mail_addr2 VARCHAR, mail_addr3 VARCHAR, mail_addr4 VARCHAR, mail_city VARCHAR, mail_state VARCHAR, mail_zipcode VARCHAR, full_phone_number VARCHAR, confidential_ind VARCHAR, registr_dt DATE, race_code VARCHAR, ethnic_code VARCHAR, party_cd VARCHAR, gender_code VARCHAR, birth_year INTEGER, age_at_year_end INTEGER, birth_state VARCHAR, drivers_lic VARCHAR, precinct_abbrv VARCHAR, precinct_desc VARCHAR, municipality_abbrv VARCHAR, municipality_desc VARCHAR, ward_abbrv VARCHAR, ward_desc VARCHAR, cong_dist_abbrv VARCHAR, super_court_abbrv VARCHAR, judic_dist_abbrv VARCHAR, nc_senate_abbrv VARCHAR, nc_house_abbrv VARCHAR, county_commiss_abbrv VARCHAR, county_commiss_desc VARCHAR, township_abbrv VARCHAR, township_desc VARCHAR, school_dist_abbrv VARCHAR, school_dist_desc VARCHAR, fire_dist_abbrv VARCHAR, fire_dist_desc VARCHAR, water_dist_abbrv VARCHAR, water_dist_desc VARCHAR, sewer_dist_abbrv VARCHAR, sewer_dist_desc VARCHAR, sanit_dist_abbrv VARCHAR, sanit_dist_desc VARCHAR, rescue_dist_abbrv VARCHAR, rescue_dist_desc VARCHAR, munic_dist_abbrv VARCHAR, munic_dist_desc VARCHAR, dist_1_abbrv VARCHAR, dist_1_desc VARCHAR, vtd_abbrv VARCHAR, vtd_desc VARCHAR);
CREATE OR REPLACE TABLE reports("year" INTEGER, doc_name VARCHAR, doc_order INTEGER, sboe_id VARCHAR, report_id INTEGER, amended BOOLEAN, image_id VARCHAR, received_image DATE, received_data DATE, start_date DATE, end_date DATE, sboe_start_date DATE, sboe_end_date DATE, cover_start_date DATE, cover_end_date DATE, cover_date_filed DATE);
CREATE OR REPLACE TABLE receipts_payer(payer_id DOUBLE, org_name VARCHAR, is_org BOOLEAN, is_us BOOLEAN, profession VARCHAR, employers_name VARCHAR, street_1 VARCHAR, city VARCHAR, state VARCHAR, full_zip VARCHAR, country_name VARCHAR, address_lookup VARCHAR);
CREATE OR REPLACE TABLE receipts(sboe_id VARCHAR, report_id INTEGER, payer_id DOUBLE, group_id INTEGER, occur_date DATE, amount DOUBLE, sum_to_date DOUBLE, is_aggregated BOOLEAN, receipt_type_desc VARCHAR, receipt_type_code VARCHAR, is_donation BOOLEAN, account_abbr VARCHAR, form_of_payment_desc VARCHAR, is_prior BOOLEAN);
CREATE OR REPLACE TABLE officers(sboe_id VARCHAR, report_id INTEGER, "type" VARCHAR, "name" VARCHAR, address_lookup VARCHAR, phone VARCHAR);
CREATE OR REPLACE TABLE expenses_payee(payee_id DOUBLE, org_name VARCHAR, is_org BOOLEAN, is_us BOOLEAN, profession VARCHAR, employers_name VARCHAR, street_1 VARCHAR, street_2 VARCHAR, city VARCHAR, state VARCHAR, full_zip VARCHAR, country_name VARCHAR, address_lookup VARCHAR);
CREATE OR REPLACE TABLE expenses(sboe_id VARCHAR, report_id INTEGER, payee_id DOUBLE, occur_date DATE, amount DOUBLE, sum_to_date DOUBLE, is_aggregated BOOLEAN, purpose_type_code VARCHAR, purpose VARCHAR, expenditure_type_desc VARCHAR, account_abbr VARCHAR, form_of_payment_desc VARCHAR);
CREATE OR REPLACE TABLE cl_name_on_ballot(candidate_id INTEGER, election_dt DATE, name_on_ballot VARCHAR, first_name VARCHAR, middle_name VARCHAR, last_name VARCHAR, name_suffix_lbl VARCHAR);
CREATE OR REPLACE TABLE cl_elections(election_dt DATE, county_name VARCHAR, contest_name VARCHAR, candidate_id INTEGER, first_name VARCHAR, middle_name VARCHAR, last_name VARCHAR, name_suffix_lbl VARCHAR);
CREATE OR REPLACE TABLE cl_contact(candidate_id INTEGER, election_dt DATE, street VARCHAR, city VARCHAR, state VARCHAR, zip_code VARCHAR, phone VARCHAR, email VARCHAR, address_lookup VARCHAR);
CREATE OR REPLACE TABLE cl_candidates(candidate_id INTEGER, name_on_ballot VARCHAR, first_name VARCHAR, middle_name VARCHAR, last_name VARCHAR, name_suffix_lbl VARCHAR, party_last VARCHAR, party_most VARCHAR, contest_n INTEGER, contest_first DATE, contest_latest DATE, street VARCHAR, city VARCHAR, state VARCHAR, zip_code VARCHAR, phone VARCHAR, email VARCHAR, address_lookup VARCHAR);
CREATE OR REPLACE TABLE addresses(address_lookup VARCHAR, address_resolved VARCHAR, lat DOUBLE, long DOUBLE, match_indicator VARCHAR, match_type VARCHAR, tiger_line_id INTEGER, tiger_side VARCHAR);
CREATE OR REPLACE TABLE cover(report_id INTEGER, sboe_id VARCHAR, committee_name VARCHAR, street_1 VARCHAR, street_2 VARCHAR, city VARCHAR, state VARCHAR, zip_code VARCHAR, country VARCHAR, postal_code VARCHAR, committee_type VARCHAR, report_type VARCHAR, fund_type VARCHAR, fund_name VARCHAR, date_from DATE, date_to DATE, date_filed DATE);
CREATE OR REPLACE TABLE committees(sboe_id VARCHAR, committee_name VARCHAR, report_id INTEGER, street_1 VARCHAR, street_2 VARCHAR, city VARCHAR, state VARCHAR, zip_code VARCHAR, address_lookup VARCHAR, committee_type VARCHAR, fund_type VARCHAR, fund_name VARCHAR);
CREATE OR REPLACE TABLE committee_candidate(sboe_id VARCHAR, candidate_id INTEGER);
CREATE OR REPLACE TABLE cl_party(candidate_id INTEGER, election_dt DATE, party_candidate VARCHAR);
