sql [为III期瞬态目录添加替代,发现和IAU名称] #eso #phase_iii #transient #catalogue #pessto #identificatio

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql [为III期瞬态目录添加替代,发现和IAU名称] #eso #phase_iii #transient #catalogue #pessto #identificatio相关的知识,希望对你有一定的参考价值。

UPDATE (SELECT DISTINCT
        t.TransientBucketId, t.name
    FROM
        transientBucket t, phase_iii_transient_catalogue_ssdr3 p
    WHERE
        t.transientBucketId = p.TransientBucketId
            AND name NOT LIKE 'atel_%'
            AND name LIKE 'SN2%') t,
    phase_iii_transient_catalogue_ssdr3 p 
SET 
    p.TRANSIENT_IAU_ID = t.name
WHERE
    t.transientBucketId = p.TransientBucketId
    and p.TRANSIENT_IAU_ID is null; 
    
UPDATE (SELECT DISTINCT
        t.TransientBucketId, t.name
    FROM
        transientBucket t, phase_iii_transient_catalogue_ssdr3 p
    WHERE
        t.transientBucketId = p.TransientBucketId
            AND name NOT LIKE 'atel_%'
            AND name LIKE 'AT2%') t,
    phase_iii_transient_catalogue_ssdr3 p 
SET 
    p.TRANSIENT_IAU_ID = t.name
WHERE
    t.transientBucketId = p.TransientBucketId
    and p.TRANSIENT_IAU_ID is null;
update (select t.transientBucketID, name, discoveryMJD from (select transientBucketID, min(observationMJD) as discoveryMJD
    from transientBucket 
    where name NOT LIKE 'atel_%'
            AND name NOT LIKE 'AT2%'
            AND name NOT LIKE 'SN2%'
            AND name NOT LIKE '<%'
            AND limitingMag = 0
            AND observationMJD > 50000
    group by transientBucketID) s, transientBucket t
    WHERE
        t.transientBucketId = s.TransientBucketId
        and t.observationMJD = s.discoveryMJD
        and name NOT LIKE 'atel_%'
            AND name NOT LIKE 'AT2%'
            AND name NOT LIKE 'SN2%'
            AND name NOT LIKE '<%'
            AND magnitude is not null
            AND limitingMag = 0
            AND observationMJD > 50000 group by transientBucketID) s, phase_iii_transient_catalogue_ssdr3 p
            set p.TRANSIENT_DISCOVERY_ID=name
            where p.transientBucketId = s.TransientBucketId;
    
update phase_iii_transient_catalogue_ssdr3 set TRANSIENT_DISCOVERY_ID=TRANSIENT_IAU_ID where TRANSIENT_DISCOVERY_ID is null;
UPDATE phase_iii_transient_catalogue_ssdr3 p,
    (SELECT 
        transientBucketId,
            GROUP_CONCAT(name
                SEPARATOR ', ') alternative_ids
    FROM
        (SELECT DISTINCT
        t.TransientBucketId, t.name
    FROM
        transientBucket t, phase_iii_transient_catalogue_ssdr3 p
    WHERE
        t.transientBucketId = p.TransientBucketId
            AND name NOT LIKE 'atel_%'
            AND name NOT LIKE 'AT2%'
            AND name NOT LIKE 'SN2%'
            AND name NOT LIKE '<%'
            AND t.observationMJD > 50000
            AND name NOT IN (SELECT 
                TRANSIENT_DISCOVERY_ID
            FROM
                phase_iii_transient_catalogue_ssdr3)) s
    GROUP BY transientBucketId) s 
SET 
    p.TRANSIENT_ALTERNATIVE_IDS = s.alternative_ids
WHERE
    p.TransientBucketId = s.TransientBucketId;

以上是关于sql [为III期瞬态目录添加替代,发现和IAU名称] #eso #phase_iii #transient #catalogue #pessto #identificatio的主要内容,如果未能解决你的问题,请参考以下文章

将 Dbcontext 配置为瞬态

替代 SQL 的 PRINT 输出

sql 从WordPress清除瞬态(内置WordPress缓存)

Java中静态最终瞬态的作用是啥?

使用核心数据实现瞬态属性

向核心数据实体添加瞬态属性是不是需要新版本模型?