Index: trunk/fundraiser-statistics/fundraiser-scripts/sql/report_campaign_banners.sql |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | |
9 | 9 | from drupal.contribution_tracking left join civicrm.civicrm_contribution ON (drupal.contribution_tracking.contribution_id = civicrm.civicrm_contribution.id) |
10 | 10 | |
11 | | -where receive_date >= %s and receive_date < %s and utm_campaign REGEXP '%s' |
| 11 | +where ts >= '%s' and ts < '%s' and utm_campaign REGEXP '%s' |
12 | 12 | |
13 | 13 | group by 1; |
14 | 14 | |
Index: trunk/fundraiser-statistics/fundraiser-scripts/sql/report_campaign_lps.sql |
— | — | @@ -0,0 +1,13 @@ |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | +select |
| 6 | + |
| 7 | +SUBSTRING_index(substring_index(utm_source, '.', 2),'.',-1) as lp |
| 8 | + |
| 9 | +from drupal.contribution_tracking left join civicrm.civicrm_contribution ON (drupal.contribution_tracking.contribution_id = civicrm.civicrm_contribution.id) |
| 10 | + |
| 11 | +where ts >= '%s' and ts < '%s' and utm_campaign REGEXP '%s' |
| 12 | + |
| 13 | +group by 1; |
| 14 | + |