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
