SQL query - missed or failed before completed

saon1990

Newcomer
Joined
Dec 8, 2017
Messages
1
Reaction score
0
Points
0
PREDATAR Control23

Hello

I want to create SQL query that will show backups that are completed but before it was missed or failed even once in for example 5 days backward.

I have created something like this to list missed backups but i don't know how to change this to work with above condition.

select node_name,completed,status from events where (status='Missed' and (scheduled_start>=current_timestamp - 5 days))
 
PREDATAR Control23

The select statement you posted does the job. What is your issue?

It is just a matter of sorting the output.
 
Last edited:
PREDATAR Control23

I think your query is not possible, but try:

select count(*) as count,node_name,status from events where (domain_name<>'' and (scheduled_start>=current_timestamp - 5 days)) group by node_name,status

Hope this helps.
 
Top