-- compare g mags across stack tables
select 
       gra,
       gdec,
       graErr,
       gdecErr,
       gPSFMag,
       gKronMag,
       gApMag,
       gExpMag,
       gSerMag,
       gDeVMag,
       gpetMag,
       gPSFMagErr,
       gKronMagErr,
       gApMagErr,
       gExpMagErr,
       gSerMagErr,
       gDeVMagErr,
       gpetMagErr,
       gpsfLikelihood,    
       gpsfQf,            
       gpsfQfPerfect,     
       gippDetectID
       from StackObjectThin 
       -- left join StackObjectRaw   using (gippDetectID)
       -- left join StackModelFitExp using (gippDetectID)
       -- left join StackModelFitDeV using (gippDetectID)
       -- left join StackModelFitSer using (gippDetectID)
       -- left join StackPetrosian   using (gippDetectID)
       -- left join StackApFlxFull   using (gippDetectID)
       -- left join StackApFlxFullC1 using (gippDetectID)
       -- left join StackApFlxFullC2 using (gippDetectID)
       join StackObjectRaw   using (gippDetectID)
       join StackModelFitExp using (gippDetectID)
       join StackModelFitDeV using (gippDetectID)
       join StackModelFitSer using (gippDetectID)
       join StackPetrosian   using (gippDetectID)
       join StackApFlxFull   using (gippDetectID)
       join StackApFlxFullC1 using (gippDetectID)
       join StackApFlxFullC2 using (gippDetectID)
       -- where (gippDetectID = 189)
       -- where (gpsfQfPerfect > 0.85)
       limit 50
