IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9484


Ignore:
Timestamp:
Oct 11, 2006, 11:34:04 AM (20 years ago)
Author:
jhoblitt
Message:

tweak -tonormalizedstats sql to eliminate double entires.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/dettool.c

    r9465 r9484  
    17261726    psString query = psStringCopy(
    17271727        "SELECT DISTINCT"
    1728         "     detRun.det_id AS det_id,"
    1729         "     detRun.det_type,"
    1730         "     detRun.iteration,"
    1731         "     rawDetrendExp.camera"
     1728        "   detRun.det_id,"
     1729        "   detRun.det_type,"
     1730        "   detRun.iteration,"
     1731// XXX determine if these fields are truely visible to HAVING without
     1732// explicitly selecting them
     1733//        "   rawDetrendExp.imfiles,"
     1734//        "   detStackedImfile.class_id"
    17321735        " FROM detRun"
    17331736        " JOIN detInputExp"
    1734         "     ON detRun.det_id = detInputExp.det_id"
    1735         "     AND detRun.iteration = detInputExp.iteration"
     1737        "   ON detRun.det_id = detInputExp.det_id"
     1738        "   AND detRun.iteration = detInputExp.iteration"
    17361739        " JOIN rawDetrendExp"
    1737         "     ON detInputExp.exp_tag = rawDetrendExp.exp_tag"
     1740        "   ON detInputExp.exp_tag = rawDetrendExp.exp_tag"
    17381741        " JOIN detStackedImfile"
    1739         "     ON detInputExp.det_id = detStackedImfile.det_id"
    1740         "     AND detInputExp.iteration = detStackedImfile.iteration"
     1742        "   ON detInputExp.det_id = detStackedImfile.det_id"
     1743        "   AND detInputExp.iteration = detStackedImfile.iteration"
    17411744        " LEFT JOIN detNormalizedStatImfile"
    1742         "     ON detRun.det_id = detNormalizedStatImfile.det_id"
    1743         "     AND detRun.iteration = detNormalizedStatImfile.iteration"
     1745        "   ON detStackedImfile.det_id = detNormalizedStatImfile.det_id"
     1746        "   AND detStackedImfile.iteration = detNormalizedStatImfile.iteration"
     1747        "   AND detStackedImfile.class_id = detNormalizedStatImfile.class_id"
    17441748        " WHERE"
    17451749        "   detRun.state = 'run'"
    17461750        "   AND detNormalizedStatImfile.det_id IS NULL"
    17471751        "   AND detNormalizedStatImfile.iteration IS NULL"
     1752        "   AND detNormalizedStatImfile.class_id IS NULL"
    17481753        " GROUP BY"
    1749         "     rawDetrendExp.exp_tag,"
    1750         "     detRun.iteration,"
    1751         "     detRun.det_id"
     1754        "   rawDetrendExp.exp_tag,"
     1755        "   detRun.iteration,"
     1756        "   detRun.det_id"
    17521757        " HAVING MAX(rawDetrendExp.imfiles) = COUNT(detStackedImfile.class_id)"
    17531758        );
Note: See TracChangeset for help on using the changeset viewer.