daily pastebin goal
55%
SHARE
TWEET

Untitled

a guest Feb 17th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT
  2.         SUM(`perf_agg_253779_p6482000`.`spent`) AS `FACEBOOK_STATISTICS_DATA_spent`,
  3.         SUM(`perf_agg_253783_p6482000`.`spent`) AS `DATE_COMPARISON_FACEBOOK_STATISTICS_spent`,
  4.         group_concat(campaign.uuid),
  5.         dates.date
  6. FROM campaign_portfolio
  7.        INNER JOIN advertiser ON advertiser.uuid = campaign_portfolio.advertiser_id
  8.        INNER JOIN profile ON profile.parent_id = advertiser.uuid
  9.        INNER JOIN budget_policy ON budget_policy.uuid = campaign_portfolio.budget_policy
  10.        INNER JOIN budget_policy_constraint ON budget_policy.uuid = budget_policy_constraint.parent_id
  11.        JOIN dates ON ((dates.date BETWEEN '2019-02-12' AND '2019-02-14') OR (dates.date BETWEEN '2019-02-09' AND '2019-02-11'))
  12.        INNER JOIN `portfolio_structure_tmp_4bba1413-f0fc-4591-9b8a-1cbd7b7a30cd`
  13.                   ON `portfolio_structure_tmp_4bba1413-f0fc-4591-9b8a-1cbd7b7a30cd`.portfolio_id = campaign_portfolio.uuid AND `portfolio_structure_tmp_4bba1413-f0fc-4591-9b8a-1cbd7b7a30cd`.date = dates.date
  14.        LEFT JOIN campaign ON `portfolio_structure_tmp_4bba1413-f0fc-4591-9b8a-1cbd7b7a30cd`.adset_id = campaign.uuid
  15.        LEFT JOIN `perf_agg_253779_p6482000`
  16.                  ON `perf_agg_253779_p6482000`.campaign_id = campaign.id_in_target AND `perf_agg_253779_p6482000`.date = dates.date AND
  17.                     `portfolio_structure_tmp_4bba1413-f0fc-4591-9b8a-1cbd7b7a30cd`.date = `perf_agg_253779_p6482000`.date
  18.        LEFT JOIN `perf_agg_253780_p6482000` ON `perf_agg_253780_p6482000`.ad_set_id = campaign.uuid AND `perf_agg_253780_p6482000`.date = dates.date AND
  19.                                                `portfolio_structure_tmp_4bba1413-f0fc-4591-9b8a-1cbd7b7a30cd`.date = `perf_agg_253780_p6482000`.date
  20.        LEFT JOIN `perf_agg_253783_p6482000`
  21.                  ON `perf_agg_253783_p6482000`.campaign_id = campaign.id_in_target AND `perf_agg_253783_p6482000`.date = dates.date AND
  22.                     `portfolio_structure_tmp_4bba1413-f0fc-4591-9b8a-1cbd7b7a30cd`.date = `perf_agg_253783_p6482000`.date
  23.        LEFT JOIN `perf_agg_253784_p6482000` ON `perf_agg_253784_p6482000`.ad_set_id = campaign.uuid AND `perf_agg_253784_p6482000`.date = dates.date AND
  24.                                                `portfolio_structure_tmp_4bba1413-f0fc-4591-9b8a-1cbd7b7a30cd`.date = `perf_agg_253784_p6482000`.date
  25. WHERE (advertiser.uuid = 6482000) AND campaign_portfolio.uuid = 99511901
  26. GROUP BY dates.date
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top