killbill-uncached

analytics: fix queries to look in the past only Signed-off-by:

5/16/2013 6:58:18 PM

Details

diff --git a/osgi-bundles/bundles/analytics/src/main/resources/reports/cancellations_per_day.sql b/osgi-bundles/bundles/analytics/src/main/resources/reports/cancellations_per_day.sql
index 6d70953..2ac5cdb 100644
--- a/osgi-bundles/bundles/analytics/src/main/resources/reports/cancellations_per_day.sql
+++ b/osgi-bundles/bundles/analytics/src/main/resources/reports/cancellations_per_day.sql
@@ -4,6 +4,7 @@ select
 , count(*) as count
 from bst
 where next_start_date > date_sub(curdate(), interval 90 day)
+and next_start_date <= curdate()
 and event = 'CANCEL_BASE'
 group by 1
 order by 1 asc
diff --git a/osgi-bundles/bundles/analytics/src/main/resources/reports/conversions_per_day.sql b/osgi-bundles/bundles/analytics/src/main/resources/reports/conversions_per_day.sql
index d748841..7f0b398 100644
--- a/osgi-bundles/bundles/analytics/src/main/resources/reports/conversions_per_day.sql
+++ b/osgi-bundles/bundles/analytics/src/main/resources/reports/conversions_per_day.sql
@@ -4,6 +4,7 @@ select
 , count(*) as count
 from bst
 where next_start_date > date_sub(curdate(), interval 90 day)
+and next_start_date <= curdate()
 and event = 'SYSTEM_CHANGE_BASE'
 and prev_phase = 'TRIAL'
 and next_phase = 'EVERGREEN'
diff --git a/osgi-bundles/bundles/analytics/src/main/resources/reports/new_accounts_per_day.sql b/osgi-bundles/bundles/analytics/src/main/resources/reports/new_accounts_per_day.sql
index ea45445..46c30c8 100644
--- a/osgi-bundles/bundles/analytics/src/main/resources/reports/new_accounts_per_day.sql
+++ b/osgi-bundles/bundles/analytics/src/main/resources/reports/new_accounts_per_day.sql
@@ -4,6 +4,7 @@ select
 , count(*) as count
 from bac
 where created_date > date_sub(curdate(), interval 90 day)
+and created_date <= curdate()
 group by 1
 order by 1 asc
 ;
diff --git a/osgi-bundles/bundles/analytics/src/main/resources/reports/new_trials_per_day.sql b/osgi-bundles/bundles/analytics/src/main/resources/reports/new_trials_per_day.sql
index f385462..674f8ea 100644
--- a/osgi-bundles/bundles/analytics/src/main/resources/reports/new_trials_per_day.sql
+++ b/osgi-bundles/bundles/analytics/src/main/resources/reports/new_trials_per_day.sql
@@ -4,6 +4,7 @@ select
 , count(*) as count
 from bst
 where next_start_date > date_sub(curdate(), interval 90 day)
+and next_start_date <= curdate()
 and event = 'ADD_BASE'
 group by 1
 order by 1 asc