 CREATE TABLE `adwords_BH_api` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `ReportDate` date DEFAULT NULL,
  `HourOfDay` smallint(5) unsigned DEFAULT NULL,
  `CampaignName` varchar(255) DEFAULT NULL,
  `CampaignStatus` varchar(255) DEFAULT NULL,
  `AdGroupName` varchar(255) DEFAULT NULL,
  `AdGroupStatus` varchar(1000) DEFAULT NULL,
  `AdGroupId` varchar(20) DEFAULT NULL,
  `Clicks` smallint(5) unsigned DEFAULT NULL,
  `Impressions` smallint(5) unsigned DEFAULT NULL,
  `Cost` decimal(8,2) DEFAULT NULL,
  `AveragePosition` decimal(4,1) DEFAULT NULL,
  `AverageCpc` decimal(8,2) DEFAULT NULL,
  `AverageCpm` decimal(8,2) DEFAULT NULL,
  `ClickConversionRate` varchar(10) DEFAULT NULL,
  `Ctr` varchar(10) DEFAULT NULL,
  `QuarterDate` date DEFAULT NULL,
  `TotalCost` decimal(10,2) DEFAULT NULL,
  `Account` varchar(15) DEFAULT NULL,
  `etl_created_date` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `ix_Date` (`ReportDate`),
  KEY `ix_AdGroupId` (`AdGroupId`),
  KEY `ix_Account` (`Account`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_small';

CREATE TABLE `adwords_IL_geo` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `report_day` date DEFAULT NULL,
  `country_territory` varchar(50) DEFAULT NULL,
  `campaign` varchar(255) DEFAULT NULL,
  `ad_group` varchar(255) DEFAULT NULL,
  `region` varchar(255) DEFAULT NULL,
  `metro_area` varchar(255) DEFAULT NULL,
  `clicks` int(10) unsigned DEFAULT NULL,
  `impressions` int(10) unsigned DEFAULT NULL,
  `cost` decimal(8,2) DEFAULT NULL,
  `avg_position` decimal(8,2) DEFAULT NULL,
  `etl_created_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `ix_IL_report_day` (`report_day`)
) ENGINE=TokuDB AUTO_INCREMENT=4885912 DEFAULT CHARSET=latin1 `compression`='tokudb_small';


CREATE TABLE `region_metro_criteria_api` (
  `RegionId` bigint(20) unsigned NOT NULL,
  `City` varchar(50) DEFAULT NULL,
  `State` varchar(50) DEFAULT NULL,
  `DMARegion` varchar(255) DEFAULT NULL,
  `DMARegionCode` bigint(20) unsigned DEFAULT NULL,
  `etl_created_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`RegionId`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_small';

CREATE TABLE `zipcodes` (
  `zipid` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `zip` char(5) DEFAULT NULL,
  `enc_zip` char(4) DEFAULT NULL,
  `state` char(2) DEFAULT NULL,
  `area` decimal(8,1) DEFAULT NULL,
  `po_name` varchar(255) DEFAULT NULL,
  `nametype` varchar(255) DEFAULT NULL,
  `cty1fips` char(4) DEFAULT NULL,
  `cty2fips` char(4) DEFAULT NULL,
  `cty3fips` char(4) DEFAULT NULL,
  `rpo_flag` char(1) DEFAULT NULL,
  `zip_type` varchar(55) NOT NULL,
  `timestamp_column` datetime NOT NULL,
  `etl_created_date` datetime DEFAULT NULL,
  `etl_modified_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`zipid`),
  UNIQUE KEY `ux_zip` (`zip`),
  KEY `ix_etl_modified_date` (`etl_modified_date`)
) ENGINE=TokuDB AUTO_INCREMENT=65536 DEFAULT CHARSET=latin1 `compression`='tokudb_small';
