What is sql statement of dataset for month of year

I want to generate a SQL statement for three data elements (A, B, C) of the dataset named “xxxx” for April 2023. how I can prepare this sql statement.

Hi @sami.oracle10g

You’d probably use the datavalue table as the main table and might want to get the values from other tables such as period, datasetelement…etc

Datavalue columns are as follows, see screenshot:

To get the above I made sure to add LIMIT to the SQL query because requesting all datavalues in the DB will probably fail,

select * from datavalue

You can add OFFSET to explore further. I would also add “Where Deleted == false” to make it easier.

I thought it’d be best to give you general idea rather than one specific example because it might not the same for the data elements you want to query.

Hope this helps… please feel free to post your finding and if you have further questions.


1 Like