select p.name, sum(1440 * (1 - value)) as minutes_down from eam_measurement_data_1d d, eam_measurement m, eam_platform p, eam_measurement_templ t, eam_monitorable_type mt where appdef_type = 1 and monitorable_type_id = mt.id and t.name = 'Availability' and m.template_id = t.id and measurement_class = 'D' and measurement_id = m.id and m.instance_id = p.id and d.timestamp >= (select max (timestamp) - (30.0 * 86400000.0) from eam_measurement_data_1d) group by p.name;
This will give you a list of your platforms by name with the total amount of downtime (in minutes) as measured by HQ. This query will take the data from 30 days ago leading up to the end of the previous day. If you want to adjust for the different number of days in the month, you will have to alter the 30.0 value in the query. Furthermore, this query will rely on being run on the day for whose previous 30 days contain the data that you are interested in. If you need to run it at some other time and need to get a specific time range, we will need to run some calculations to get the specific time values to feed into the query.
That's what I was talking about. I'll read that thread to learn how to do it, but by the way seems to me that the project itself (Minerva) only will be concluded by the summer, right?