Index: trunk/tools/wiki_nightly_stacks_table.pl
===================================================================
--- trunk/tools/wiki_nightly_stacks_table.pl	(revision 27514)
+++ trunk/tools/wiki_nightly_stacks_table.pl	(revision 27515)
@@ -22,10 +22,14 @@
 $db = init_gpc_db();
 
-@targets = ('M31','MD01','MD02','MD03','MD04','MD05','MD06','MD07','MD08','MD09','MD10');
+@targets = ('M31','MD01','MD02','MD03','MD04','MD05','MD06','MD07','MD08','MD09','MD10','ThreePi','STS','SweetSpot');
 
 # potential targets
 if (exists($opt{P})) {
     foreach $t (@targets) {
-	$sth = "select filter,DATE_FORMAT(rawExp.dateobs,'%Y-%m-%d') AS day,count(filter) FROM rawExp JOIN newExp using(exp_id) WHERE rawExp.fault = 0 AND exp_type = 'OBJECT' AND comment LIKE '${t}%' AND dateobs >= '2009-12-08T00:00:00' GROUP BY day,filter";
+	$comment = $t;
+	if ($comment eq 'ThreePi') {
+	    $comment = '3Pi';
+	}
+	$sth = "select filter,DATE_FORMAT(rawExp.dateobs,'%Y-%m-%d') AS day,count(filter) FROM rawExp JOIN newExp using(exp_id) WHERE rawExp.fault = 0 AND exp_type = 'OBJECT' AND comment LIKE '%${comment}%' AND dateobs >= '2010-02-12T00:00:00' GROUP BY day,filter";
 	$data_ref = $db->selectall_arrayref( $sth );
 	foreach $rr (@{ $data_ref }) {
@@ -63,5 +67,5 @@
 #queued in chip
 
-$sth = "select rawExp.dateobs,chipRun.state,rawExp.filter,count(chipRun.state),chipRun.data_group,chipRun.dist_group from chipRun JOIN rawExp using (exp_id)  where chipRun.label LIKE '%nightlystack' GROUP BY data_group,filter,state ORDER BY dateobs";
+$sth = "select rawExp.dateobs,chipRun.state,rawExp.filter,count(chipRun.state),chipRun.data_group,chipRun.dist_group from chipRun JOIN rawExp using (exp_id)  where chipRun.label LIKE '%nightlyscience' GROUP BY data_group,filter,state ORDER BY dateobs";
 
 $data_ref = $db->selectall_arrayref( $sth );
@@ -133,5 +137,5 @@
 
 #warps
-$sth = "select rawExp.dateobs,warpRun.state,rawExp.filter,count(warpRun.state),warpRun.data_group,warpRun.dist_group from warpRun JOIN fakeRun using (fake_id) JOIN camRun using (cam_id) JOIN chipRun using (chip_id) JOIN rawExp using (exp_id)  where warpRun.label LIKE '%nightlystack' GROUP BY data_group,filter,state ORDER BY data_group,filter"; 
+$sth = "select rawExp.dateobs,warpRun.state,rawExp.filter,count(warpRun.state),warpRun.data_group,warpRun.dist_group from warpRun JOIN fakeRun using (fake_id) JOIN camRun using (cam_id) JOIN chipRun using (chip_id) JOIN rawExp using (exp_id)  where warpRun.label LIKE '%nightlyscience' GROUP BY data_group,filter,state ORDER BY data_group,filter"; 
 $data_ref = $db->selectall_arrayref( $sth );
 
@@ -175,5 +179,5 @@
 
 
-$sth = "select state,count(skycell_id),data_group,dist_group,filter from stackRun where label LIKE '%nightlystack' group by data_group,filter,state";
+$sth = "select state,count(skycell_id),data_group,dist_group,filter from stackRun where label LIKE '%nightlyscience' group by data_group,filter,state";
 $data_ref = $db->selectall_arrayref( $sth );
 
@@ -245,5 +249,5 @@
 # distribution
 
-$sth = "select distRun.data_group,dist_group,filter,count(stage_id) from distRun JOIN stackRun ON (stage_id = stack_id) where distRun.label LIKE '%.nightlystack' AND distRun.state = 'full' GROUP BY distRun.data_group,filter";
+$sth = "select distRun.data_group,dist_group,filter,count(stage_id) from distRun JOIN stackRun ON (stage_id = stack_id) where distRun.label LIKE '%.nightlyscience' AND distRun.state = 'full' GROUP BY distRun.data_group,filter";
 
 $data_ref = $db->selectall_arrayref( $sth );
@@ -284,5 +288,5 @@
 # faulted distributed
 
-$sth = "select * from rcDSFileset join distRun using(dist_id) where rcDSFileset.fault > 0 and date(registered) >= '2010-01-01' AND label LIKE 'M%.nightlystack' order by fs_id asc";
+$sth = "select * from rcDSFileset join distRun using(dist_id) where rcDSFileset.fault > 0 and date(registered) >= '2010-01-01' AND label LIKE 'M%.nightlyscience' order by fs_id asc";
 $data_ref = $db->selectall_arrayref( $sth );
 
