-- DBMS: bigquery
CREATE TABLE `bigquery-public-data.sec_quarterly_financials.numbers`
(
  submission_number STRING NOT NULL OPTIONS(description="Accession Number. The 20-character string formed from the 18-digit number assigned by the Commission to each EDGAR submission. submission_number: [adsh]"),
  company_name STRING OPTIONS(description="Name of registrant from the submission table. This corresponds to the name of the legal entity as recorded in EDGAR as of the filing date."),
  measure_tag STRING NOT NULL OPTIONS(description="The unique identifier (name) for a tag in a specific taxonomy release. measure_tag: [tag]"),
  version STRING NOT NULL OPTIONS(description="For a standard tag, an identifier for the taxonomy; otherwise the accession number where the tag was defined."),
  period_end_date INT64 NOT NULL OPTIONS(description="The end date for the data value, rounded to the nearest month end. period_end_date: [ddate]"),
  number_of_quarters INT64 NOT NULL OPTIONS(description="The count of the number of quarters represented by the data value, rounded to the nearest whole number. \\\"0\\\" indicates it is a point-in-time value. number_of_quarters: [qtrs]"),
  units STRING NOT NULL OPTIONS(description="The unit of measure for the value. units: [uom]"),
  dimension_hash STRING NOT NULL OPTIONS(description="The 32-byte hexadecimal key for the dimensional information in the DIM data set. dimension_hash: [dimh]"),
  iprx INT64 NOT NULL OPTIONS(description="A positive integer to distinguish different reported facts that otherwise would have the same primary key. For most purposes, data with iprx greater than 1 are not needed. The priority for the fact based on higher precision, closeness of the end date to a month end, and closeness of the duration to a multiple of three months. See fields dcml, durp and datp below."),
  value FLOAT64 OPTIONS(description="The value. This is not scaled, it is as found in the Interactive Data file, but is rounded to four digits to the right of the decimal point."),
  footnote STRING OPTIONS(description="The plain text of any superscripted footnotes on the value, if any, as shown on the statement page, truncated to 512 characters."),
  footnote_length INT64 OPTIONS(description="Number of bytes in the plain text of the footnote prior to truncation; zero if no footnote. footnote_length: [footlen]"),
  num_dimensions INT64 OPTIONS(description="Small integer representing the number of dimensions. Note that this value is a function of the dimension segments. num_dimensions: [dimn]"),
  coregistrant STRING OPTIONS(description="If specified, indicates a specific co-registrant, the parent company, or other entity (e.g., guarantor). NULL indicates the consolidated entity. Note that this value is a function of the dimension segments. coregistrant: [coreg]"),
  duration_fraction FLOAT64 OPTIONS(description="The difference between the reported fact duration and the quarter duration (qtrs), expressed as a fraction of 1. For example, a fact with duration of 120 days rounded to a 91-day quarter has a durp value of 29/91 = +0.3187. duration_fraction: [durp]"),
  date_fraction FLOAT64 OPTIONS(description="The difference between the reported fact date and the month-end rounded date (ddate), expressed as a fraction of 1. For example, a fact reported for 29/Dec, with ddate rounded to 31/Dec, has a datp value of minus 2/31 = -0.0645. date_fraction: [datp]"),
  decimal INT64 OPTIONS(description="The value of the fact \\\"decimals\\\" attribute, with INF represented by 32767. decimal: [dcml]")
)
PARTITION BY DATE(_PARTITIONTIME);

INSERT INTO `bigquery-public-data.sec_quarterly_financials.numbers` (submission_number, company_name, measure_tag, version, period_end_date, number_of_quarters, units, dimension_hash, iprx, value, footnote, footnote_length, num_dimensions, coregistrant, duration_fraction, date_fraction, decimal, _PARTITIONTIME) VALUES ('0000002178-14-000010', 'ADAMS RESOURCES & ENERGY, INC.', 'ProvedUndevelopedReserveVolume', 'us-gaap/2012', 20111231, 0, 'bbl', '0x4b6210c8bc381142cdb473ce4f0dfc49', 0, 15000.0, '', 0, 1, '', 0.0, 0.0, -3, NULL), ('0000002178-14-000010', 'ADAMS RESOURCES & ENERGY, INC.', 'CapitalizedCostsOilAndGasProducingActivitiesGross', 'us-gaap/2012', 20131231, 0, 'USD', '0x00000000', 0, 98947000.0, '', 0, 0, '', 0.0, 0.0, -3, NULL), ('0000002178-14-000010', 'ADAMS RESOURCES & ENERGY, INC.', 'GainLossOnSaleOfDerivatives', 'us-gaap/2012', 20121231, 4, 'USD', '0x58dd9928a5056b801614ab21a7bf0b19', 0, 1338000.0, '', 0, 1, '', 0.0, 0.0, -3, NULL), ('0000002178-14-000010', 'ADAMS RESOURCES & ENERGY, INC.', 'MarketingPropertyAndEquipment', '0000002178-14-000010', 20131231, 0, 'USD', '0x00000000', 0, 52996000.0, '', 0, 0, '', 0.0, 0.0, -3, NULL), ('0000002178-14-000010', 'ADAMS RESOURCES & ENERGY, INC.', 'DeferredIncomeTaxesAndOtherLiabilitiesNoncurrent', 'us-gaap/2012', 20131231, 0, 'USD', '0x00000000', 0, 18664000.0, '', 0, 0, '', 0.0, 0.0, -3, NULL);