-- DBMS: bigquery
CREATE TABLE `bigquery-public-data.usda_nass_agriculture.census2002`
(
  source_desc STRING OPTIONS(description="Source of data (CENSUS or SURVEY). Census program includes the Census of Ag as well as follow up projects. Survey program includes national, state, and county surveys."),
  sector_desc STRING OPTIONS(description="Five high level, broad categories useful to narrow down choices (CROPS, ANIMALS & PRODUCTS, ECONOMICS, DEMOGRAPHICS, and ENVIRONMENTAL)."),
  group_desc STRING OPTIONS(description="Subsets within sector (e.g., under sector = CROPS, the groups are FIELD CROPS, FRUIT & TREE NUTS, HORTICULTURE, and VEGETABLES)."),
  commodity_desc STRING OPTIONS(description="The primary subject of interest (e.g., CORN, CATTLE, LABOR, TRACTORS, OPERATORS)."),
  class_desc STRING OPTIONS(description="Generally a physical attribute (e.g., variety, size, color, gender) of the commodity."),
  prodn_practice_desc STRING OPTIONS(description="A method of production or action taken on the commodity (e.g., IRRIGATED, ORGANIC, ON FEED)."),
  util_practice_desc STRING OPTIONS(description="Utilizations (e.g., GRAIN, FROZEN, SLAUGHTER) or marketing channels (e.g., FRESH MARKET, PROCESSING, RETAIL)."),
  statisticcat_desc STRING OPTIONS(description="The aspect of a commodity being measured (e.g., AREA HARVESTED, PRICE RECEIVED, INVENTORY, SALES)."),
  unit_desc STRING OPTIONS(description="The unit associated with the statistic category (e.g., ACRES, $ / LB, HEAD, $, OPERATIONS)."),
  short_desc STRING OPTIONS(description="A concatenation of six columns: commodity_desc, class_desc, prodn_practice_desc, util_practice_desc, statisticcat_desc, and unit_desc."),
  domain_desc STRING OPTIONS(description="Generally another characteristic of operations that produce a particular commodity (e.g., ECONOMIC CLASS, AREA OPERATED, NAICS CLASSIFICATION, SALES). For chemical usage data, the domain describes the type of chemical applied to the commodity. The domain = TOTAL will have no further breakouts; i.e., the data value pertains completely to the short_desc."),
  domaincat_desc STRING OPTIONS(description="Categories or partitions within a domain (e.g., under domain = SALES, domain categories include $1,000 TO $9,999, $10,000 TO $19,999, etc)."),
  agg_level_desc STRING OPTIONS(description="Aggregation level or geographic granularity of the data (e.g., STATE, AG DISTRICT, COUNTY, REGION, ZIP CODE)."),
  state_ansi STRING OPTIONS(description="American National Standards Institute (ANSI) standard 2-digit state codes."),
  state_fips_code STRING OPTIONS(description="NASS 2-digit state codes; include 99 and 98 for US TOTAL and OTHER STATES, respectively; otherwise match ANSI codes."),
  state_alpha STRING OPTIONS(description="State abbreviation, 2-character alpha code."),
  state_name STRING OPTIONS(description="State full name."),
  asd_code STRING OPTIONS(description="NASS defined county groups, unique within a state, 2-digit ag statistics district code."),
  asd_desc STRING OPTIONS(description="Ag statistics district name."),
  county_ansi STRING OPTIONS(description="ANSI standard 3-digit county codes."),
  county_code STRING OPTIONS(description="NASS 3-digit county codes; includes 998 for OTHER (COMBINED) COUNTIES and Alaska county codes; otherwise match ANSI codes."),
  county_name STRING OPTIONS(description="County name."),
  region_desc STRING OPTIONS(description="NASS defined geographic entities not readily defined by other standard geographic levels. A region can be a less than a state (SUB-STATE) or a group of states (MULTI-STATE), and may be specific to a commodity."),
  zip_5 STRING OPTIONS(description="US Postal Service 5-digit zip code."),
  watershed_code STRING OPTIONS(description="US Geological Survey (USGS) 8-digit Hydrologic Unit Code (HUC) for watersheds."),
  watershed_desc STRING OPTIONS(description="Name assigned to the HUC."),
  congr_district_code STRING OPTIONS(description="US Congressional District 2-digit code."),
  country_code STRING OPTIONS(description="US Census Bureau, Foreign Trade Division 4-digit country code, as of April, 2007."),
  country_name STRING OPTIONS(description="Country name."),
  location_desc STRING OPTIONS(description="Full description for the location dimension."),
  year STRING OPTIONS(description="The numeric year of the data."),
  freq_desc STRING OPTIONS(description="Length of time covered (ANNUAL, SEASON, MONTHLY, WEEKLY, POINT IN TIME). MONTHLY often covers more than one month. POINT IN TIME is as of a particular day."),
  begin_code STRING OPTIONS(description="If applicable, a 2-digit code corresponding to the beginning of the reference period (e.g., for freq_desc = MONTHLY, begin_code ranges from 01 (January) to 12 (December))."),
  end_code STRING OPTIONS(description="If applicable, a 2-digit code corresponding to the end of the reference period (e.g., the reference period of JAN THRU MAR will have begin_code = 01 and end_code = 03)."),
  reference_period_desc STRING OPTIONS(description="The specific time frame, within a freq_desc."),
  week_ending STRING OPTIONS(description="Week ending date, used when freq_desc = WEEKLY."),
  load_time STRING OPTIONS(description="Date and time indicating when record was inserted into Quick Stats database."),
  value STRING OPTIONS(description="Published data value."),
  cv_percent STRING OPTIONS(description="Coefficient of variation. Available for the 2012 Census of Agriculture only. County-level CVs are generalized.")
);

INSERT INTO `bigquery-public-data.usda_nass_agriculture.census2002` (source_desc, sector_desc, group_desc, commodity_desc, class_desc, prodn_practice_desc, util_practice_desc, statisticcat_desc, unit_desc, short_desc, domain_desc, domaincat_desc, agg_level_desc, state_ansi, state_fips_code, state_alpha, state_name, asd_code, asd_desc, county_ansi, county_code, county_name, region_desc, zip_5, watershed_code, watershed_desc, congr_district_code, country_code, country_name, location_desc, year, freq_desc, begin_code, end_code, reference_period_desc, week_ending, load_time, value, cv_percent) VALUES ('CENSUS', 'ANIMALS & PRODUCTS', 'LIVESTOCK', 'HOGS', 'ALL CLASSES', 'CONTRACTOR OR INTEGRATOR', 'ALL UTILIZATION PRACTICES', 'SALES', 'OPERATIONS', 'HOGS, CONTRACTOR OR INTEGRATOR - OPERATIONS WITH SALES', 'SALES OF HOGS', 'SALES OF HOGS: (25 TO 49 HEAD)', 'STATE', '19.0', '19', 'IA', 'IOWA', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', NULL, NULL, '9000', 'UNITED STATES', 'IOWA', '2002', 'ANNUAL', '0', '0', 'YEAR', NULL, '2012-01-01 00:00:00', '2', NULL), ('CENSUS', 'CROPS', 'CROP TOTALS', 'CROP TOTALS', 'ALL CLASSES', 'ALL PRODUCTION PRACTICES', 'ALL UTILIZATION PRACTICES', 'SALES', '$', 'CROP TOTALS - SALES, MEASURED IN $', 'NAICS CLASSIFICATION', 'NAICS CLASSIFICATION: (111331)', 'STATE', '19.0', '19', 'IA', 'IOWA', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', NULL, NULL, '9000', 'UNITED STATES', 'IOWA', '2002', 'ANNUAL', '0', '0', 'YEAR', NULL, '2012-01-01 00:00:00', '3,106,000', NULL), ('CENSUS', 'CROPS', 'FIELD CROPS', 'HAY', 'SMALL GRAIN', 'IRRIGATED, PART OF CROP, IRRIGATED PORTION', 'ALL UTILIZATION PRACTICES', 'AREA HARVESTED', 'ACRES', 'HAY, SMALL GRAIN, IRRIGATED, PART OF CROP, IRRIGATED PORTION - ACRES HARVESTED', 'TOTAL', 'NOT SPECIFIED', 'STATE', '19.0', '19', 'IA', 'IOWA', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', NULL, NULL, '9000', 'UNITED STATES', 'IOWA', '2002', 'ANNUAL', '0', '0', 'YEAR', NULL, '2012-01-01 00:00:00', '(D)', NULL), ('CENSUS', 'CROPS', 'FIELD CROPS', 'HAY', 'WILD', 'ALL PRODUCTION PRACTICES', 'ALL UTILIZATION PRACTICES', 'AREA HARVESTED', 'ACRES', 'HAY, WILD - ACRES HARVESTED', 'AREA HARVESTED', 'AREA HARVESTED: (15.0 TO 24.9 ACRES)', 'STATE', '19.0', '19', 'IA', 'IOWA', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', NULL, NULL, '9000', 'UNITED STATES', 'IOWA', '2002', 'ANNUAL', '0', '0', 'YEAR', NULL, '2012-01-01 00:00:00', '(D)', NULL), ('CENSUS', 'ECONOMICS', 'EXPENSES', 'ANIMAL TOTALS', '(EXCL BREEDING)', 'ALL PRODUCTION PRACTICES', 'ALL UTILIZATION PRACTICES', 'EXPENSE', '$', 'ANIMAL TOTALS, (EXCL BREEDING) - EXPENSE, MEASURED IN $', 'EXPENSE', 'EXPENSE: (1,000 TO 4,999 $)', 'STATE', '19.0', '19', 'IA', 'IOWA', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', NULL, NULL, '9000', 'UNITED STATES', 'IOWA', '2002', 'ANNUAL', '0', '0', 'YEAR', NULL, '2012-01-01 00:00:00', '6,885,000', NULL);