Index: trunk/fundraiser-statistics/fundraiser-scripts/sql/report_campaign_metrics_minutely.sql |
— | — | @@ -9,17 +9,19 @@ |
10 | 10 | |
11 | 11 | from |
12 | 12 | |
| 13 | + |
| 14 | + |
13 | 15 | (select |
14 | 16 | DATE_FORMAT(request_time,'%sY%sm%sd%sH') as dt_hr, |
15 | 17 | FLOOR(MINUTE(request_time) / %s) * %s as dt_min, |
16 | 18 | utm_source as banner, |
17 | 19 | landing_page, |
18 | 20 | count(*) as views |
19 | | -from landing_page |
| 21 | +from landing_page_requests |
20 | 22 | where request_time >= '%s' and request_time < '%s' and utm_campaign REGEXP '%s' |
21 | 23 | group by 1,2,3,4) as lp |
22 | 24 | |
23 | | -join |
| 25 | +left join |
24 | 26 | |
25 | 27 | (select |
26 | 28 | |
Index: trunk/fundraiser-statistics/fundraiser-scripts/sql/report_campaign_metrics_minutely_total.sql |
— | — | @@ -13,11 +13,11 @@ |
14 | 14 | DATE_FORMAT(request_time,'%sY%sm%sd%sH') as dt_hr, |
15 | 15 | FLOOR(MINUTE(request_time) / %s) * %s as dt_min, |
16 | 16 | count(*) as views |
17 | | -from landing_page |
| 17 | +from landing_page_requests |
18 | 18 | where request_time >= '%s' and request_time < '%s' and utm_campaign REGEXP '%s' |
19 | 19 | group by 1,2) as lp_tot |
20 | 20 | |
21 | | -join |
| 21 | +left join |
22 | 22 | |
23 | 23 | (select |
24 | 24 | |