add failed snapshots_rules script

This commit is contained in:
Collin M. Barrett 2018-08-24 18:36:31 -05:00
parent 5a854d649a
commit 74773b046e
2 changed files with 6 additions and 0 deletions

View file

@ -41,6 +41,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sql", "sql", "{A4BB2C81-5232-4162-B410-704D123D2C01}"
ProjectSection(SolutionItems) = preProject
scripts\sql\createDb.sql = scripts\sql\createDb.sql
scripts\sql\failedSnapshotsRules.sql = scripts\sql\failedSnapshotsRules.sql
scripts\sql\getDuplicateRules.sql = scripts\sql\getDuplicateRules.sql
scripts\sql\resetSnapshotsRules.sql = scripts\sql\resetSnapshotsRules.sql
scripts\sql\snapshotTimeAnalysis.sql = scripts\sql\snapshotTimeAnalysis.sql

View file

@ -0,0 +1,5 @@
SELECT snapshotid, COUNT(*)
FROM snapshots_rules
JOIN snapshots ON snapshots_rules.snapshotid = snapshots.id
WHERE snapshots.wassuccessful = FALSE
GROUP BY snapshots.id