Changeset 15826
- Timestamp:
- Dec 14, 2007, 10:22:45 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/share/dettool_tonormalizedexp.sql (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/share/dettool_tonormalizedexp.sql
r15769 r15826 1 SELECT DISTINCT 2 * 3 FROM 4 (SELECT DISTINCT 5 detRun.det_id as det_id, 1 SELECT 2 * 3 -- COUNT(norm_class_id) as nNorm, 4 -- COUNT(stack_class_id) as nStack 5 FROM ( 6 SELECT DISTINCT 7 detRun.det_id, 6 8 detRun.iteration, 7 9 detRun.det_type, 8 detRun.workdir, 10 -- detRun.workdir, 11 -- rawExp.exp_id, 9 12 rawExp.camera, 10 13 rawExp.telescope, 11 14 rawExp.exp_type, 12 detNormalizedImfile.class_id, 13 rawImfile.class_id as rawimfile_class_id 15 -- detNormalizedExp.det_id as norm_det_id, 16 detNormalizedImfile.class_id as norm_class_id, 17 detNormalizedImfile.fault, 18 detStackedImfile.class_id as stack_class_id 14 19 FROM detRun 15 20 JOIN detInputExp … … 18 23 JOIN rawExp 19 24 ON detInputExp.exp_id = rawExp.exp_id 20 JOIN detNormalizedImfile 21 ON detInputExp.det_id = detNormalizedImfile.det_id 22 AND detInputExp.iteration = detNormalizedImfile.iteration 23 LEFT JOIN rawImfile 24 ON detInputExp.exp_id = rawImfile.exp_id 25 AND detNormalizedImfile.class_id = rawImfile.class_id 25 JOIN detStackedImfile 26 ON detStackedImfile.det_id = detRun.det_id 27 AND detStackedImfile.iteration = detRun.iteration 28 LEFT JOIN detNormalizedImfile 29 ON detStackedImfile.det_id = detNormalizedImfile.det_id 30 AND detStackedImfile.iteration = detNormalizedImfile.iteration 31 AND detStackedImfile.class_id = detNormalizedImfile.class_id 26 32 LEFT JOIN detNormalizedExp 27 33 ON detInputExp.det_id = detNormalizedExp.det_id 28 34 AND detInputExp.iteration = detNormalizedExp.iteration 29 35 WHERE 30 detRun.state = 'run' 31 AND detRun.mode = 'master' 32 AND detNormalizedExp.det_id IS NULL33 AND detNormalizedExp.iteration IS NULL34 ANDdetInputExp.include = 135 GROUP BY 36 detNormalizedImfile.iteration, 37 detRun.det_id38 HAVING39 COUNT(detNormalizedImfile.class_id) = COUNT(rawImfile.class_id) 40 AND SUM(detNormalizedImfile.fault) = 041 ) as Foo36 -- detRun.state = 'run' AND 37 -- detRun.mode = 'master' AND 38 detNormalizedExp.det_id IS NULL AND 39 detNormalizedExp.iteration IS NULL AND 40 detInputExp.include = 1 41 ) as Foo 42 GROUP BY 43 det_id, 44 iteration 45 HAVING 46 COUNT(norm_class_id) = COUNT(stack_class_id) 47 AND SUM(fault) = 0
Note:
See TracChangeset
for help on using the changeset viewer.
