← Back to team overview

dhis2-devs team mailing list archive

Table for SQL query for Indicators

 

Dear friends,

I am trying to output data of a questionnaire (called DataSetName here)
from SQL View  for the period of September 2016 from  data values using the
following code:

select dv.sourceid as organisationunitid, ou.name, ou.shortname, ou.code as
CodeAC, de.name as intitule, pe.startdate, pe.enddate,
coc.categoryoptioncomboname, dv.value from datavalue dv inner join
organisationunit ou on (dv.sourceid=ou.organisationunitid) inner join
dataelement de on (dv.dataelementid=de.dataelementid) inner join period pe
on (pe.startdate='2016-09-01') inner join _categoryoptioncomboname coc on
(dv.categoryoptioncomboid=coc.categoryoptioncomboid) where
(dv.dataelementid in (select dataelementid from datasetmembers where
datasetid in (select datasetid from dataset where name='DataSetName')));

If I would like to output data from indicator tables, on which table in
DHIS2 should I base the select query?

Thank you for your support!

Kind Regards,

Tantely.

-- 
*This message and its attachments are confidential and solely for the 
intended recipients. If received in error, please delete them and notify 
the sender via reply e-mail immediately.*

Follow ups