--DROP TABLE IF EXISTS yolo_county_base_feature;

CREATE TABLE yolo_county_base_feature AS
SELECT  
a.geography_id, 
a.source_id, 
b.wkb_geometry, 
a.region_lu_code, 
a.built_form_key, 
a.acres_developable,
a.land_development_category,
a.developable_proportion, 
a.intersection_density_sqmi, 
a.sqft_parcel, 
a.acres_gross, 
a.acres_parcel, 
a.acres_parcel_res, 
a.acres_parcel_emp, 
a.acres_parcel_mixed_use, 
a.acres_parcel_no_use, 
a.pop, 
a.hh, 
a.du,
a.du_detsf, 
a.du_attsf, 
a.du_mf, 
a.emp, 
a.emp_ret, 
a.emp_off, 
a.emp_pub, 
a.emp_ind, 
a.emp_ag, 
a.emp_military,
a.du_detsf_ll, 
a.du_detsf_sl, 
a.du_mf2to4,
a.du_mf5p,
a.emp_retail_services,
a.emp_restaurant,
a.emp_accommodation,
a.emp_arts_entertainment,
a.emp_other_services,
a.emp_office_services,
a.emp_public_admin,
a.emp_education,
a.emp_medical_services,
a.emp_manufacturing,
a.emp_wholesale,
a.emp_transport_warehousing,
a.emp_utilities,
a.emp_construction,
a.emp_agriculture,
a.emp_extraction,
a.bldg_sqft_detsf_sl,
a.bldg_sqft_detsf_ll,
a.bldg_sqft_attsf,
a.bldg_sqft_mf,
a.bldg_sqft_retail_services,
a.bldg_sqft_restaurant,
a.bldg_sqft_accommodation,
a.bldg_sqft_arts_entertainment,
a.bldg_sqft_other_services,
a.bldg_sqft_office_services,
a.bldg_sqft_public_admin,
a.bldg_sqft_education,
a.bldg_sqft_medical_services,
a.bldg_sqft_transport_warehousing,
a.bldg_sqft_wholesale,
a.acres_parcel_res_detsf,
a.acres_parcel_res_detsf_sl,
a.acres_parcel_res_detsf_ll,
a.acres_parcel_res_attsf,
a.acres_parcel_res_mf,
a.acres_parcel_emp_ret,
a.acres_parcel_emp_off,
a.acres_parcel_emp_pub,
a.acres_parcel_emp_ind,
a.acres_parcel_emp_ag,
a.acres_parcel_emp_military,
a.residential_irrigated_sqft,
a.commercial_irrigated_sqft,
a.created,
a.updated,
a.dev_pct,
a.density_pct,
a.gross_net_pct,
b.dirty_flag 
FROM 
yolo_county_base_feature_old b
LEFT JOIN yolo_county_base_features2 a ON b.geography_id = a.geography_id
;