Index: trunk/ippMonitor/def/newsimplePlotStaticskyImage.d
===================================================================
--- trunk/ippMonitor/def/newsimplePlotStaticskyImage.d	(revision 35742)
+++ trunk/ippMonitor/def/newsimplePlotStaticskyImage.d	(revision 40882)
@@ -1,3 +1,3 @@
-TABLE staticskyRun, staticskyInput, stackRun, skycell 
+TABLE staticskyRun JOIN staticskyInput USING (sky_id) JOIN stackRun USING (stack_id) JOIN skycell using (skycell_id)
 TITLE New sky plot - staticsky
 FILE  simplePlotStaticskyImage.php
@@ -5,7 +5,4 @@
 
 WHERE staticskyRun.state != 'new' 
-WHERE staticskyRun.sky_id = staticskyInput.sky_id
-WHERE staticskyInput.stack_id = stackRun.stack_id
-WHERE stackRun.skycell_id = skycell.skycell_id
 WHERE stackRun.tess_id = skycell.tess_id
 
