Index: trunk/fundraiser-statistics/fundraiser-scripts/sql/report_total_amounts.sql |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | sum(if(utm_campaign NOT REGEXP 'EM' and utm_campaign NOT REGEXP 'RE',converted_amount ,0)) as banner_amt, |
10 | 10 | sum(if(utm_source REGEXP '_US' and utm_campaign NOT REGEXP 'EM' and utm_campaign NOT REGEXP 'RE',converted_amount,0)) as US_amt, |
11 | 11 | sum(if(utm_source REGEXP '_EN' and utm_campaign NOT REGEXP 'EM' and utm_campaign NOT REGEXP 'RE',converted_amount,0)) as EN_amt, |
12 | | -sum(if(utm_campaign NOT REGEXP'_EN' and utm_source NOT REGEXP '_US' and utm_campaign NOT REGEXP'EM' and utm_campaign NOT REGEXP 'RE',converted_amount,0)) as OT_amt, |
| 12 | +sum(if(utm_source NOT REGEXP'_EN' and utm_source NOT REGEXP '_US' and utm_campaign NOT REGEXP'EM' and utm_campaign NOT REGEXP 'RE',converted_amount,0)) as OT_amt, |
13 | 13 | sum(if(utm_campaign REGEXP 'EM' or utm_campaign REGEXP 'RE' , converted_amount ,0)) as email_amt, |
14 | 14 | sum(if(utm_source REGEXP '.rpp' ,1 ,0))*0.5*8*10 as recurring_guess, |
15 | 15 | |