← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5136: Sql resource

 

------------------------------------------------------------
revno: 5136
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-11-10 20:24:16 +0100
message:
  Sql resource
modified:
  resources/sql/integritychecks.sql


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'resources/sql/integritychecks.sql'
--- resources/sql/integritychecks.sql	2011-09-11 20:23:37 +0000
+++ resources/sql/integritychecks.sql	2011-11-10 19:24:16 +0000
@@ -59,6 +59,15 @@
 join reporttable t using(reporttableid)
 where t.name='Indicators';
 
+-- Show collection frequency of data elements with average aggregation operator
+
+select distinct de.name, periodtype.name 
+from dataelement de 
+join datasetmembers using (dataelementid) 
+join dataset using (datasetid) 
+join periodtype using(periodtypeid) 
+where de.aggregationtype = 'average';
+
 -- Recreate indexes on aggregated tables
 
 drop index aggregateddatavalue_index;