Here is what I am trying to do:
I have a MSSQL table that is being written to every 5 minutes with data, so this amounts to 288 points of data every 24 hours. I need to be able to have a stored procedure that will give me the MAX value found within that most recent 24 hour period. The 24 hour period needs to have a fixed pointer that starts at 12 AM on the present day. So basically I would like to be able to run the stored procedure periodically at will, which would then return the MAX value of the accumulated data from the current 24 hour period.
Your expertise would be appreciated thank you in advance.