SCOM Capacity and availability report

Hi Team,

I need to submit Capacity(Memory and CPU) & Availability reports for a month.
E.g Maximum, Minimum, Average for the month. not in daily format.

Please help with any SQL Query to convert the daily data to monthly format.