Index: /trunk/tools/heather/expbot.pl
===================================================================
--- /trunk/tools/heather/expbot.pl	(revision 30367)
+++ /trunk/tools/heather/expbot.pl	(revision 30368)
@@ -141,5 +141,5 @@
 print `date`;
 
-my $dist1q = "select exp_name, comment, rawExp.state, count(stage_id) from rawExp left join chipRun using (exp_id) left join camRun using (chip_id) left join distRun on cam_id = stage_id and stage = 'camera' where dateobs like '$date%' and exp_type = 'OBJECT' group by exp_name;";
+my $dist1q = "select exp_name, comment, rawExp.state, count(stage_id) from rawExp left join chipRun using (exp_id) left join distRun on chip_id = stage_id and stage = 'chip' where dateobs like '$date%' and exp_type = 'OBJECT' group by exp_name;";
 my $dist1 = $db->selectall_arrayref($dist1q) || 
     die "Unable to execute SQL: $DBI::errstr\n";
@@ -173,5 +173,5 @@
 
 print `date`;
-my $dist3q =  "select exp_name, comment, rawExp.state, count(stage_id) from rawExp left join chipRun using (exp_id) left join camRun using (chip_id) left join distRun on cam_id = stage_id and stage = 'camera' where dateobs like '$date%' and exp_type = 'OBJECT' group by exp_name;";
+my $dist3q =  "select exp_name, comment, rawExp.state, count(stage_id) from rawExp left join chipRun using (exp_id) left join camRun using (chip_id) left join fakeRun using (cam_id) left join warpRun using (fake_id) left join distRun on warp_id = stage_id and stage = 'warp' where dateobs like '$date%' and exp_type = 'OBJECT' group by exp_name;";
 my $dist3 = $db->selectall_arrayref($dist3q) || 
     die "Unable to execute SQL: $DBI::errstr\n";
