I have 2 tables: 1) List of servers that should be backed up (CMDB table) 2) I have a dataset from an API call. This contains multiple lines of data to determine whether a backup has been successful.
Now the server name is unique and I want to know what for each server: 1) The status of the last backup is 2) The date of the last successful backup. 3) How many times the backup has been successful in the last 30 days.
Not every server has been backed up (e.g. new servers) in the last 30 days.
If a server does appear in the table CMDB but does not have a backup status (missed/completed etc) then that status should not be found.
Can someone give me a direction on how to do this?