wiki:db/queries/024
Last modified 6 years ago Last modified on 01/31/2013 11:21:14 PM

Find galaxies that are blended with a star, output the deblended galaxy (or stellar) magnitudes

SELECT  G.objectId,                               -- output galaxy
        G.uMag,G.gMag,G.rMag,G.iMag,G.zMag,G.yMag -- and magnitudes (galaxy or stellar)
FROM    Galaxy G
JOIN    _Source2Object M1 ON (G.objectId = M1.objectId)
JOIN    _Source2Object M2 ON (M1.sourceId = M2.sourceId)
JOIN    Star S ON (M2.objectId = S.objectId); 

This query outputs info for galaxies which have at least one detection which is assigned to a galaxy and a star.

This query originally came from SDSS (S-6)