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/staticskytool_result.sql

    r34719 r43014  
    11SELECT
    2     staticskyResult.*,
    3     staticskyRun.state,
    4     staticskyRun.workdir,
    5     staticskyRun.label,
    6     stackRun.tess_id,
    7     stackRun.skycell_id,
     2    -- EAM only return values needed by supporting code
     3    -- this query is used in dist_advancerun.pl & permcheck.pl
     4    -- needed fields: workdir, skycell_id, path_base
     5    MIN(staticskyResult.path_base) AS path_base,
     6    MIN(staticskyRun.state) AS state,
     7    MIN(staticskyRun.workdir) AS workdir,
     8    MIN(staticskyRun.label) AS label,
     9    MIN(stackRun.tess_id) AS tess_id,
     10    MIN(stackRun.skycell_id) AS skycell_id,
    811    count(stackRun.filter) AS num_filters,
    9     TRUNCATE(skycell.radeg/15., 4) AS rahours,
    10     skycell.radeg,
    11     skycell.decdeg,
    12     skycell.glong,
    13     skycell.glat
     12    TRUNCATE(MIN(skycell.radeg)/15., 4) AS rahours,
     13    MIN(skycell.radeg) AS radeg,
     14    MIN(skycell.decdeg) AS decdeg,
     15    MIN(skycell.glong) AS glong,
     16    MIN(skycell.glat) AS glat
    1417FROM staticskyRun
    1518JOIN staticskyResult USING(sky_id)
Note: See TracChangeset for help on using the changeset viewer.