Skip to content
Advertisement

How to calculate percentage of availability using 2 sql query and combining it into result

I have to create a service availability using info from this 2 query.

First Query.

example result

second query

example result

The formula as below ((Reporting Period – Unplanned Outage)/Reporting Period)*100

Advertisement

Answer

Consider using conditional aggregation:

The availability computation could probably be simplified:

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement