Index: trunk/ippTools/share/difftool_pendingcleanuprun.sql
===================================================================
--- trunk/ippTools/share/difftool_pendingcleanuprun.sql	(revision 32117)
+++ trunk/ippTools/share/difftool_pendingcleanuprun.sql	(revision 32218)
@@ -2,5 +2,5 @@
 -- all of this is just to get the camera used for the diff run
 SELECT DISTINCT * FROM 
-   (SELECT 
+   (SELECT DISTINCT
 	    diffRun.diff_id,
 	    rawExp.camera,
@@ -29,6 +29,7 @@
              diffRun.state = 'goto_scrubbed' OR 
 	     diffRun.state = 'goto_purged')
+	@INNERLIMITS@
      UNION
-     SELECT
+     SELECT DISTINCT
 	    diffRun.diff_id,
 	    rawExp.camera,
@@ -57,6 +58,7 @@
              diffRun.state = 'goto_scrubbed' OR 
 	     diffRun.state = 'goto_purged')
+	@INNERLIMITS@
      UNION
-     SELECT
+     SELECT DISTINCT 
 	    diffRun.diff_id,
 	    rawExp.camera,
@@ -85,6 +87,7 @@
              diffRun.state = 'goto_scrubbed' OR 
 	     diffRun.state = 'goto_purged')
+	@INNERLIMITS@
      UNION
-     SELECT
+     SELECT DISTINCT
 	    diffRun.diff_id,
 	    rawExp.camera,
@@ -113,4 +116,5 @@
              diffRun.state = 'goto_scrubbed' OR 
 	     diffRun.state = 'goto_purged')
+	@INNERLIMITS@
 	) as Foo
 	WHERE 1
