-- DBMS: bigquery
CREATE TABLE `bigquery-public-data.fdic_banks.locations`
(
  fdic_certificate_number STRING OPTIONS(description="A unique number assigned by the FDIC used to identify institutions and for the issuance of insurance certificates."),
  institution_name STRING OPTIONS(description="The legal name of the institution."),
  branch_name STRING OPTIONS(description="Name of the branch."),
  branch_number STRING OPTIONS(description="The branch's corresponding office number."),
  main_office BOOL OPTIONS(description="The main office for the institution."),
  branch_address STRING OPTIONS(description="Street address at which the branch is physically located."),
  branch_city STRING OPTIONS(description="City in which branch is physically located."),
  zip_code STRING OPTIONS(description="The first five digits of the full postal zip code representing physical location of the branch."),
  branch_county STRING OPTIONS(description="County where the branch is physically located."),
  county_fips_code STRING OPTIONS(description="A five digit number representing the state and county in which the institution is physically located.  The first two digits represent the FIPS state numeric code and the last three digits represent the FIPS county numeric code."),
  state STRING OPTIONS(description="State abbreviation in which the branch is physically located. The FDIC Act defines state as any State of the United States, the District of Columbia, and any territory of the United States, Puerto Rico, Guam, American Samoa, the Trust Territory of the Pacific Islands, the Virgin Island, and the Northern Mariana Islands."),
  state_name STRING OPTIONS(description="State in which the  branch is physically located. The FDIC Act defines state as any State of the United States, the District of Columbia, and any territory of the United States, Puerto Rico, Guam, American Samoa, the Trust Territory of the Pacific Islands, the Virgin Island, and the Northern Mariana Islands."),
  institution_class STRING OPTIONS(description="\"A classification code assigned by the FDIC based on the institution's charter type (commercial bank or savings institution), charter agent (state or federal), Federal Reserve membership status (Fed member, Fed nonmember) and its primary federal regulator (state chartered institutions are subject to both federal and state supervision). N -Commercial bank, national (federal) charter and Fed member, supervised by the Office of the Comptroller of the Currency (OCC) NM -Commercial bank, state charter and Fed nonmember, supervised by the FDIC OI - Insured U.S. branch of a foreign chartered institution (IBA) SA - Savings associations, state or federal charter, supervised by the Office of Thrift Supervision (OTS) SB - Savings banks, state charter, supervised by the FDIC SM - Commercial bank, state charter and Fed member, supervised by the Federal Reserve (FRB)\""),
  cbsa_fips_code STRING OPTIONS(description="Numeric code of the Core Based Statistical Area (CBSA) as defined by the US Census Bureau Office of Management and Budget."),
  cbsa_name STRING OPTIONS(description="Name of the Core Based Statistical Area (CBSA) as defined by the US Census Bureau Office of Management and Budget."),
  cbsa_division_flag BOOL OPTIONS(description="A flag indicating member of a Core Based Statistical Division as defined by the US Census Bureau Office of Management and Budget."),
  cbsa_division_fips_code INT64 OPTIONS(description="Numeric code of the Core Based Statistical Division as defined by the US Census Bureau Office of Management and Budget."),
  cbsa_division_name STRING OPTIONS(description="Name of the Core Based Statistical Division as defined by the US Census Bureau Office of Management and Budget."),
  cbsa_metro_flag BOOL OPTIONS(description="A flag used to indicate whether an branch is in a Metropolitan Statistical Area as defined by the US Census Bureau Office of Management and Budget"),
  cbsa_metro_fips_code STRING OPTIONS(description="Numeric code of the Metropolitan Statistical Area as defined by the US Census Bureau Office of Management and Budget"),
  cbsa_metro_name STRING OPTIONS(description="Name of the Metropolitan Statistical Area as defined by the US Census Bureau Office of Management and Budget"),
  cbsa_micro_flag BOOL OPTIONS(description="A flag (1=Yes) used to indicate whether an branch is in a Micropolitan Statistical Area as defined by the US Census Bureau Office of Management and Budget"),
  csa_flag BOOL OPTIONS(description="Flag (1=Yes) indicating member of a Combined Statistical Area (CSA) as defined by the US Census Bureau Office of Management and Budget"),
  csa_fips_code STRING OPTIONS(description="Numeric code of the Combined Statistical Area (CSA) as defined by the US Census Bureau Office of Management and Budget"),
  csa_name STRING OPTIONS(description="Name of the Combined Statistical Area (CSA) as defined by the US Census Bureau Office of Management and Budget"),
  date_established DATE OPTIONS(description="The date on which the branch began operations."),
  fdic_uninum STRING OPTIONS(description="This is the FDIC UNINUM of the institution that owns the branch. A UNINUM is a unique sequentially number added to the FDIC database for both banks and branches. There is no pattern imbedded within the number. The FI_UNINUM is updated with every merger or purchase of branches to reflect the most current owner."),
  last_updated DATE OPTIONS(description="The day the institution information was updated."),
  service_type STRING OPTIONS(description="\"Define the various types of offices of FDIC-insured institutions. 11 -  Full Service Brick and Mortar Office 12 -  Full Service Retail Office 13 -  Full Service Cyber Office 14 -  Full Service Mobile Office 15 -  Full Service Home/Phone Banking 16 -  Full Service Seasonal Office 21 -  Limited Service Administrative Office 22 -  Limited Service Military Facility 23 -  Limited Service Facility Office 24 -  Limited Service Loan Production Office 25 -  Limited Service Consumer Credit Office 26 -  Limited Service Contractual Office 27 -  Limited Service Messenger Office 28 -  Limited Service Retail Office 29 -  Limited Service Mobile Office 30 -  Limited Service Trust Office\""),
  branch_fdic_uninum STRING OPTIONS(description="Unique Identification Number for a Branch Office as assigned by the FDIC")
);

INSERT INTO `bigquery-public-data.fdic_banks.locations` (fdic_certificate_number, institution_name, branch_name, branch_number, main_office, branch_address, branch_city, zip_code, branch_county, county_fips_code, state, state_name, institution_class, cbsa_fips_code, cbsa_name, cbsa_division_flag, cbsa_division_fips_code, cbsa_division_name, cbsa_metro_flag, cbsa_metro_fips_code, cbsa_metro_name, cbsa_micro_flag, csa_flag, csa_fips_code, csa_name, date_established, fdic_uninum, last_updated, service_type, branch_fdic_uninum) VALUES ('18600', 'SunSouth Bank', 'CLIO BRANCH', '1', False, '3274 Louisville Street', 'Clio', '36017', 'Barbour', '01005', 'AL', 'Alabama', 'NM', '21640', 'Eufaula, AL-GA', False, NULL, NULL, False, 'NULL', NULL, True, False, NULL, NULL, '2002-06-17', '12486', '2022-10-14', '11', '363899'), ('4988', 'Trustmark National Bank', 'BANKTRUST OF ALABAMA BRANCH', '276', False, '218-220 East Broad Street', 'Eufaula', '36027', 'Barbour', '01005', 'AL', 'Alabama', 'N', '21640', 'Eufaula, AL-GA', False, NULL, NULL, False, 'NULL', NULL, True, False, NULL, NULL, '1926-01-01', '3327', '2022-10-14', '11', '6141'), ('6384', 'PNC Bank, National Association', 'EUFAULA SQUARE BRANCH', '4716', False, '1009 South Eufaula Avenue', 'Eufaula', '36027', 'Barbour', '01005', 'AL', 'Alabama', 'N', '21640', 'Eufaula, AL-GA', False, NULL, NULL, False, 'NULL', NULL, True, False, NULL, NULL, '1972-08-23', '4287', '2022-10-14', '11', '248463'), ('16910', '22nd State Bank', 'EUFAULA AVENUE BRANCH', '1', False, '21 Eufaula Avenue', 'Clayton', '36016', 'Barbour', '01005', 'AL', 'Alabama', 'NM', '21640', 'Eufaula, AL-GA', False, NULL, NULL, False, 'NULL', NULL, True, False, NULL, NULL, '1992-12-07', '10995', '2022-10-14', '11', '239519'), ('16910', '22nd State Bank', '22nd State Bank', '0', True, '1920 Main St', 'Louisville', '36048', 'Barbour', '01005', 'AL', 'Alabama', 'NM', '21640', 'Eufaula, AL-GA', False, NULL, NULL, False, 'NULL', NULL, True, False, NULL, NULL, '1917-01-01', '10995', '2022-10-14', '11', '10995');