Hi Connor,
Thank you for valuable answers.
I am writing my answers below of yours.
1) to_date(to_char(begin_interval_time can just be "trunc" or "cast as date"
Answer: Thank you I will do it.
2) I assume you're going to work under the assumption that there was not database bounce anywhere here?
Answer: Yes you are right. I assume there was not db bounce.
We can also add below condition for specific dates.
/*AND SNAP.BEGIN_INTERVAL_TIME >=
TO_DATE ('03/10/2022', 'DD/MM/YYYY')
AND SNAP.END_INTERVAL_TIME <
TO_DATE ('04/10/2022', 'DD/MM/YYYY')*/
3) as a "just in case" you should join on all appropriate columns to dba_hist_snapshot, ie, dbid, instance_number
Answer: Thank you. I will join that columns also.
Please note that I have 2-Node RAC and only a Non-CDB database.
--
I have only an extra question;
Is my SQL code giving the correct result? Is it logically correct?Since the value is cumulative, I subtracted the minimum values from the maximum values on a day and instance basis and summed these values.
Please correct me if the logic is incorrect.
Thanks in advance.
Serhat CELIK.