m_karampasis
13 years agoLevel 4
OPS Analytics Custom Report for Drives at Down State (SQL QUERY)
Hello all,
We would like to create a custom OPS report in a weekly basis with all the drives that were in a down state during that week.
Thank you in regards.
Try this:
SELECT dda.DriveName, utcBigIntToNomTime(a.creationTime) AS 'Time', las.name AS 'Assigned Status', a.assignedTo AS 'Assigned To'FROM am_Alert aINNER JOIN am_AlertPolicy apON a.alertPolicyId = ap.idINNER JOIN am_DriveDownAlert ddaON a.id = dda.alertIdINNER JOIN lookup_AlertAssignmentState lasON a.assignmentState = las.idWHERE ap.name = 'Drive Down' AND utcBigIntToNomTime(a.creationTime) > GETDATE() - 7