← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5210: scripts

 

------------------------------------------------------------
revno: 5210
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-11-24 10:18:23 +0100
message:
  scripts
modified:
  resources/sql/div.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/div.sql'
--- resources/sql/div.sql	2011-09-30 13:50:03 +0000
+++ resources/sql/div.sql	2011-11-24 09:18:23 +0000
@@ -6,3 +6,18 @@
 join categorycombos_optioncombos co
 on (cc.categoryoptioncomboid=co.categoryoptioncomboid)
 where categorycomboid=12414 );
+
+-- Data elements and frequency with average agg operator (lower than yearly negative for data mart performance)
+
+select d.dataelementid, d.name, pt.name from dataelement d 
+join datasetmembers dsm on d.dataelementid=dsm.dataelementid 
+join dataset ds on dsm.datasetid=ds.datasetid 
+join periodtype pt on ds.periodtypeid = pt.periodtypeid 
+where d.aggregationtype = 'average';
+
+-- Data elements with aggregation levels
+
+select d.dataelementid, d.name, dal.aggregationlevel from dataelementaggregationlevels dal 
+join dataelement d on dal.dataelementid=d.dataelementid 
+order by name, aggregationlevel;
+