Changeset 16588 for trunk/ippTools/share/pztool_find_completed_exp.sql
- Timestamp:
- Feb 21, 2008, 6:09:46 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/share/pztool_find_completed_exp.sql (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/share/pztool_find_completed_exp.sql
r16334 r16588 1 1 SELECT DISTINCT 2 exp_name, -- return should match pzDo neExp2 exp_name, -- return should match pzDownloadExp 3 3 camera, 4 telescope 4 telescope, 5 state 5 6 FROM ( 6 7 SELECT 7 pzDoneImfile.*, 8 pzDownloadImfile.*, 9 pzDownloadExp.state, 8 10 summitExp.imfiles 9 FROM pzDo neExp11 FROM pzDownloadExp 10 12 JOIN summitExp 11 13 USING(exp_name, camera, telescope) 12 LEFT JOIN pzDo neImfile14 LEFT JOIN pzDownloadImfile 13 15 USING(exp_name, camera, telescope) 14 16 LEFT JOIN newExp 15 ON pzDo neExp.exp_name = newExp.tmp_exp_name16 AND pzDo neExp.camera = newExp.tmp_camera17 AND pzDo neExp.telescope = newExp.tmp_telescope17 ON pzDownloadExp.exp_name = newExp.tmp_exp_name 18 AND pzDownloadExp.camera = newExp.tmp_camera 19 AND pzDownloadExp.telescope = newExp.tmp_telescope 18 20 WHERE 19 newExp.tmp_exp_name IS NULL 21 pzDownloadExp.state = 'run' 22 AND newExp.tmp_exp_name IS NULL 20 23 AND newExp.tmp_camera IS NULL 21 24 AND newExp.tmp_telescope IS NULL 22 25 GROUP BY 23 pzDo neExp.exp_name,24 pzDo neExp.camera,25 pzDo neExp.telescope26 -- it doesn't matter which field in pzDo neImfile we count as we've already27 -- donea group by26 pzDownloadExp.exp_name, 27 pzDownloadExp.camera, 28 pzDownloadExp.telescope 29 -- it doesn't matter which field in pzDownloadImfile we count as we've 30 -- already Download a group by 28 31 HAVING 29 COUNT(pzDo neImfile.exp_name) = summitExp.imfiles30 AND SUM(pzDo neImfile.fault) = 032 COUNT(pzDownloadImfile.exp_name) = summitExp.imfiles 33 AND SUM(pzDownloadImfile.fault) = 0 31 34 ) as Foo
Note:
See TracChangeset
for help on using the changeset viewer.
