IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 24739


Ignore:
Timestamp:
Jul 9, 2009, 2:46:46 PM (17 years ago)
Author:
bills
Message:

simplify query for raw files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/share/disttool_pendingcomponent.sql

    r24682 r24739  
    1818    rawImfile.magicked
    1919FROM distRun
    20 JOIN rawExp ON exp_id = stage_id
    21 JOIN (                      -- find the last satisfactory chip run
    22                             -- note this requires that a chip run have been completed even when
    23                             -- magic is not required for the run
    24     SELECT
    25         exp_id,
    26         MAX(chip_id) AS chip_id
    27     FROM chipRun
    28     JOIN distRun ON stage_id = exp_id AND stage = 'raw'
    29     WHERE
    30         chipRun.state = 'full'
    31         AND chipRun.exp_id = exp_id
    32         AND (chipRun.magicked OR distRun.no_magic)
    33         GROUP BY exp_id
    34     ) AS bestChipRun
    35     USING(exp_id)
     20JOIN rawExp ON rawExp.exp_id = stage_id
    3621JOIN rawImfile USING(exp_id)
     22JOIN chipRun ON chipRun.exp_id = rawExp.exp_id and chipRun.magicked
    3723JOIN chipProcessedImfile
    38     USING(exp_id, chip_id, class_id)
     24    USING(chip_id, class_id)
    3925LEFT JOIN distComponent
    4026    ON distRun.dist_id = distComponent.dist_id
Note: See TracChangeset for help on using the changeset viewer.