IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 20739


Ignore:
Timestamp:
Nov 13, 2008, 3:57:01 PM (17 years ago)
Author:
Paul Price
Message:

DISTINCT covers a multitude of sins. Removing "magic_id IS NULL" so
that we can re-do magic on an exposure if desired (we'll add this in
to magictool).

File:
1 edited

Legend:

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

    r20734 r20739  
    11-- Get a list of exposures on which magic may be performed
    2 SELECT
     2SELECT DISTINCT
    33    exp_id,
    44    filter,
    55    num_todo,
    6     num_done
     6    num_done,
     7    magic_id
    78FROM (
    89    -- Number of skycells as a function of exposure
     
    1011        exp_id,
    1112        filter,
    12         COUNT(DISTINCT skycell_id) AS num_todo
     13        COUNT(DISTINCT warpSkyfile.tess_id,warpSkyfile.skycell_id) AS num_todo
    1314    FROM rawExp
    1415    JOIN chipRun USING(exp_id)
     
    1819    JOIN warpSkyCellMap USING(warp_id)
    1920    JOIN warpSkyfile USING(warp_id, skycell_id)
     21    JOIN diffInputSkyfile USING(warp_id,skycell_id)
     22    JOIN diffRun USING(diff_id)
    2023    WHERE
    2124        warpSkyfile.ignored = 0
    22         AND warpRun.state = 'full'
    23         --- magicSkycellNums WHERE hook %s
     25        -- magicSkycellNums WHERE hook %s
    2426    GROUP BY
    2527        exp_id
     
    3537    ) AS magicDiffNums USING(exp_id)
    3638LEFT JOIN magicRun USING(exp_id)
    37 WHERE
    38     magicRun.magic_id IS NULL
Note: See TracChangeset for help on using the changeset viewer.