text: --
  -- table
  --
  create table {SCHEMA}fetch_apple_search_ads_adgroups (
      adamid character varying(765) not null,
      appname character varying(765),
      avgcpa double precision,
      avgcpt double precision,
      campaignid character varying(765) not null,
      campaignname character varying(6138),
      campaignstatus character varying(765),
      adgroupid character varying(765) not null,
      adgroupname character varying(6138),
      conversionrate double precision,
      conversions double precision,
      conversionslatoff double precision,
      conversionslaton double precision,
      conversionsnewdownloads double precision,
      conversionsredownloads double precision,
      date date not null,
      deleted bool,
      adgroupstatus character varying(765),
      adgroupdisplaystatus character varying(765),
      impressions double precision,
      localspend double precision,
      cpagoal double precision,
      defaultcpcbid double precision,
      starttime timestamp without time zone,
      endtime timestamp without time zone,
      modificationtime timestamp without time zone,
      adgroupservingstatereasons character varying(6138),
      adgroupservingstatus character varying(765),
      taps double precision,
      ttr double precision,
      automatedkeywordsoptin boolean not null,
      company_display_name character varying(765),
      org_id character varying(765) not null,
      org_name character varying(765),
      app_display_name character varying(765),
      platform character varying(765),
      product character varying(765),
      product_id character varying(189),
      product_name character varying(765),
      product_platform character varying(765),
      product_os character varying(189),
      latest_campaign_name character varying(6138),
      latest_adgroup_name character varying(6138),
      original_currency character varying(9),
      converted_currency character varying(9),
      currency_conversion_rate double precision,
      crystallized bool NOT NULL default true,
      fetch_date datetime,
      PRIMARY KEY (adgroupid, "date")
  )
  distkey ("date")
  sortkey ("date", adgroupid);
  