Index: trunk/ippTools/share/difftool_skyfile.sql
===================================================================
--- trunk/ippTools/share/difftool_skyfile.sql	(revision 18952)
+++ trunk/ippTools/share/difftool_skyfile.sql	(revision 18975)
@@ -3,8 +3,25 @@
     diffRun.tess_id,
     diffRun.state,
-    diffSkyfile.*
+    diffSkyfile.*,
+    rawExp.exp_id,
+    rawExp.camera
 FROM diffRun
 JOIN diffSkyfile
     USING(diff_id)
+-- my new stuff begins here
+JOIN diffInputSkyfile
+    ON diffInputSkyfile.diff_id = diffRun.diff_id
+    AND diffInputSkyfile.template = 0
+JOIN warpRun
+    ON diffInputSkyfile.warp_id = warpRun.warp_id
+JOIN fakeRun
+    ON warpRun.fake_id = fakeRun.fake_id
+JOIN camRun
+    ON camRun.cam_id = fakeRun.cam_id
+JOIN chipRun
+    ON camRun.chip_id = chipRun.chip_id
+JOIN rawExp
+    ON chipRun.exp_id = rawExp.exp_id
+-- my new stuff ends here
     WHERE
     -- bogus test to allow appending conditionals
Index: trunk/ippTools/share/stacktool_sumskyfile.sql
===================================================================
--- trunk/ippTools/share/stacktool_sumskyfile.sql	(revision 18952)
+++ trunk/ippTools/share/stacktool_sumskyfile.sql	(revision 18975)
@@ -1,8 +1,21 @@
 SELECT
     stackSumSkyfile.*,
-    stackRun.state
+    stackRun.state,
+    rawExp.camera
 FROM stackRun
 JOIN stackSumSkyfile
     USING(stack_id)
+JOIN warpRun
+    -- just need 1 warp to find the camera
+    ON warpRun.warp_id = (SELECT warp_id FROM stackInputSkyfile 
+                            WHERE stackInputSkyfile.stack_id = stackRun.stack_id limit 1)
+JOIN fakeRun
+    ON warpRun.fake_id = fakeRun.fake_id
+JOIN camRun
+    ON camRun.cam_id   = fakeRun.cam_id
+JOIN chipRun
+    ON camRun.chip_id  = chipRun.chip_id
+JOIN rawExp
+    ON chipRun.exp_id  = rawExp.exp_id
 WHERE
 -- bogus test; just here so there there is a 'WHERE' stmt to append conditionals too
Index: trunk/ippTools/share/warptool_warped.sql
===================================================================
--- trunk/ippTools/share/warptool_warped.sql	(revision 18952)
+++ trunk/ippTools/share/warptool_warped.sql	(revision 18975)
@@ -1,8 +1,18 @@
 SELECT
     warpSkyfile.*,
-    warpRun.state
+    warpRun.state,
+    rawExp.exp_id,
+    rawExp.camera
 FROM warpRun
 JOIN warpSkyfile
     USING(warp_id)
+JOIN fakeRun
+    ON warpRun.fake_id = fakeRun.fake_id
+JOIN camRun
+    ON camRun.cam_id   = fakeRun.cam_id
+JOIN chipRun
+    ON camRun.chip_id  = chipRun.chip_id
+JOIN rawExp
+    ON chipRun.exp_id  = rawExp.exp_id
 WHERE
 -- bogus test; just here so there there is a 'WHERE' stmt to append conditionals too
