IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 11, 2026, 3:09:36 PM (2 months ago)
Author:
eugene
Message:

fix various SQL errors caught by more strict mysql versions, especially: force SQL to select a specific entry from non-aggregated fields when other fields are aggregated using e.g., GROUP BY

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-pstamp-20260421/ippTools/share/dettool_tostacked.sql

    r15769 r43014  
    1414
    1515SELECT
    16     detProcessedImfile.det_id,
     16    -- why is this using detProcessedImfile.det_id and not detRun.det_id
     17    -- MIN(detProcessedImfile.det_id) as det_id,
     18    detRun.det_id,
    1719    detRun.iteration,
    1820    detRun.det_type,
    1921    detRun.workdir,
    2022    detRun.reduction,
    21     detProcessedImfile.class_id,
    22     rawExp.camera,
    23     rawExp.exp_tag
     23    -- detProcessedImfile.class_id could have NULLs given LEFT JOIN,
     24    -- detProcessedImfile.class_id,
     25    rawImfile.class_id,
     26    MIN(rawExp.camera) AS camera
     27    -- not needed in output?
     28    -- rawExp.exp_tag
    2429FROM detRun
    2530JOIN detInputExp
Note: See TracChangeset for help on using the changeset viewer.