Index: trunk/ippTools/share/difftool_pendingcleanuprun.sql
===================================================================
--- trunk/ippTools/share/difftool_pendingcleanuprun.sql	(revision 19092)
+++ trunk/ippTools/share/difftool_pendingcleanuprun.sql	(revision 24186)
@@ -9,5 +9,5 @@
     USING(diff_id)
 JOIN warpSkyfile
-    ON  diffInputSkyfile.warp_id    = warpSkyfile.warp_id
+    ON  diffInputSkyfile.warp1    = warpSkyfile.warp_id
     AND diffInputSkyfile.skycell_id = warpSkyfile.skycell_id
     AND diffInputSkyfile.tess_id    = warpSkyfile.tess_id
@@ -23,3 +23,3 @@
     USING(exp_id)
 WHERE
-    diffRun.state = 'goto_cleaned'
+    (diffRun.state = 'goto_cleaned' OR diffRun.state = 'goto_scrubbed' OR diffRun.state = 'goto_purged')
