- Timestamp:
- Apr 28, 2011, 6:41:17 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20110406/ippTools/share/laptool_inactiveexp.sql
r31396 r31407 4 4 W.*,IFNULL(diff1.diff_id,diff2.diff_id) AS diff_id FROM ( 5 5 SELECT DISTINCT 6 lap_id,tess_id,projection_cell,filter,lapRun.state as lapRun_state, lapRun.registered, lapRun.fault, labRun.label, 6 lapRun.lap_id, lapRun.seq_id, lapRun.tess_id, lapRun.projection_cell, lapRun.filter, lapRun.state, lapRun.label, 7 lapRun.dist_group, lapRun.registered, lapRun.fault, lapRun.quick_sass_id, lapRun.final_sass_id, 7 8 lapExp.exp_id,lapExp.chip_id,lapExp.pair_id,private,pairwise,active,lapExp.data_state, 8 9 chipRun.state as chipRun_state, sum(chipProcessedImfile.fault) as chip_faults, sum(chipProcessedImfile.quality) as chip_quality, 9 cam Run.state as camRun_state, sum(camProcessedExp.fault) AS cam_faults, sum(camProcessedExp.quality) AS cam_quality,10 fake Run.state as fakeRun_state, sum(fakeProcessedImfile.fault) as fake_faults,11 warp Run.state as warpRun_state, sum(warpSkyfile.fault) as warp_faults, sum(warpSkyfile.quality) as warp_quality,10 cam_id, camRun.state as camRun_state, sum(camProcessedExp.fault) AS cam_faults, sum(camProcessedExp.quality) AS cam_quality, 11 fake_id, fakeRun.state as fakeRun_state, sum(fakeProcessedImfile.fault) as fake_faults, 12 warp_id, warpRun.state as warpRun_state, sum(warpSkyfile.fault) as warp_faults, sum(warpSkyfile.quality) as warp_quality, 12 13 warpRun.magicked 13 14 FROM lapRun JOIN lapExp USING(lap_id) 14 JOIN chipRun USING(chip_id,exp_id)15 FROM chipRunJOIN chipProcessedImfile USING(chip_id)15 LEFT JOIN chipRun USING(chip_id) 16 LEFT JOIN chipProcessedImfile USING(chip_id) 16 17 LEFT JOIN camRun USING(chip_id) LEFT JOIN camProcessedExp USING(cam_id) 17 18 LEFT JOIN fakeRun USING(cam_id) LEFT JOIN fakeProcessedImfile USING(fake_id) … … 19 20 WHERE lapExp.active = FALSE 20 21 AND @WHERE@ 22 GROUP BY lap_id,exp_id 21 23 ) AS W 22 24 -- This was unreasonably slow in testing, so that's why I'm using a subquery here. … … 25 27 ) AS D 26 28 LEFT JOIN diffRun USING(diff_id) 27 JOIN lapExp AS others ON (D.chip_id = lapExp.chip_id AND D.lap_id != lapExp.lap_id)28 GROUP BY chip_id29 JOIN lapExp AS others ON (D.chip_id = others.chip_id AND D.lap_id != others.lap_id) 30 GROUP BY lap_id,exp_id
Note:
See TracChangeset
for help on using the changeset viewer.
