killbill-uncached
analytics: pivot by phase type in cancellations_per_day report Signed-off-by: …
5/29/2013 9:30:35 PM
Changes
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 1bba486..9d353d0 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
@@ -1,10 +1,11 @@
create or replace view v_cancellations_per_day as
select
- date_format(next_start_date, '%Y-%m-%d') as day
+ prev_phase as pivot
+, date_format(next_start_date, '%Y-%m-%d') as day
, count(*) as count
from bst
where event = 'CANCEL_BASE'
and report_group = 'default'
-group by 1
-order by 1 asc
+group by 1, 2
+order by 1, 2 asc
;