r90628 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90627‎ | r90628 | r90629 >
Date:23:06, 22 June 2011
Author:rfaulk
Status:deferred
Tags:
Comment:
used in 'campaigns' django view to display a list of campaigns with donation, timestamp, and report info
Modified paths:
  • /trunk/fundraiser-statistics/fundraiser-scripts/sql/report_campaign_totals.sql (modified) (history)

Diff [purge]

Index: trunk/fundraiser-statistics/fundraiser-scripts/sql/report_campaign_totals.sql
@@ -6,15 +6,15 @@
77 faulkner.test.test_name,
88 drupal.contribution_tracking.utm_campaign,
99 sum(not isnull(contribution_tracking.contribution_id)) as donations,
10 -min(receive_date) as earliest_timestamp,
11 -if(not isnull(faulkner.test.test_name),1,0) as report_exists
 10+min(ts) as earliest_timestamp,
 11+if(not isnull(faulkner.test.test_name),1,NULL) as report_exists
1212
1313 from
1414 drupal.contribution_tracking left join civicrm.civicrm_contribution ON (drupal.contribution_tracking.contribution_id = civicrm.civicrm_contribution.id)
1515 left join faulkner.test on faulkner.test.utm_campaign = drupal.contribution_tracking.utm_campaign
1616
17 -where receive_date >= %s and receive_date < %s
 17+where ts >= '%s' and ts < '%s'
1818
1919 group by 2
20 -order by 3 desc;
 20+order by 4 desc;
2121

Status & tagging log