Index: trunk/ippTools/share/stacktool_tosum.sql
===================================================================
--- trunk/ippTools/share/stacktool_tosum.sql	(revision 19558)
+++ trunk/ippTools/share/stacktool_tosum.sql	(revision 19598)
@@ -5,23 +5,8 @@
     stackRun.workdir,
     stackRun.label,
-    stackRun.state,
-    rawExp.camera
+    stackRun.state
 FROM stackRun
 JOIN stackInputSkyfile
     USING(stack_id)
-JOIN warpSkyfile
-    ON  stackInputSkyfile.warp_id = warpSkyfile.warp_id
-    AND stackRun.skycell_id       = warpSkyfile.skycell_id
-    AND stackRun.tess_id          = warpSkyfile.tess_id
-JOIN warpRun
-    ON warpRun.warp_id = warpSkyfile.warp_id
-JOIN fakeRun
-    USING(fake_id)
-JOIN camRun
-    USING(cam_id)
-JOIN chipRun
-    USING(chip_id)
-JOIN rawExp
-    USING(exp_id)
 LEFT JOIN stackSumSkyfile
     USING(stack_id)
@@ -30,4 +15,4 @@
         AND stackSumSkyfile.stack_id IS NULL)
     OR
-    (stackRun.state = 'update' 
+    (stackRun.state = 'update'
         AND stackSumSkyfile.data_state = 'cleaned'))
