-- compare g fluxes across tables
select 
       gra,
       gdec,
       gPSFFlux,
       gApFlux,
       gPSFFluxErr,
       gApFluxErr,
       gApFillFac,
       StackApFlx.gflxR3 as gflxR3_v1,
       StackApFlxFull.gflxR3 as gflxR3_v2,
       StackApFlx.gflxR4 as gflxR4_v1,
       StackApFlxFull.gflxR4 as gflxR4_v2,
       StackApFlx.gflxR5 as gflxR5_v1,
       StackApFlxFull.gflxR5 as gflxR5_v2,
       StackApFlx.gflxR3Err as gflxR3Err_v1,
       StackApFlxFull.gflxR3Err as gflxR3Err_v2,
       StackApFlx.gflxR4Err as gflxR4Err_v1,
       StackApFlxFull.gflxR4Err as gflxR4Err_v2,
       StackApFlx.gflxR5Err as gflxR5Err_v1,
       StackApFlxFull.gflxR5Err as gflxR5Err_v2,
       gippDetectID
       from StackObjectThin 
       join StackObjectRaw   using (gippDetectID)
       join StackApFlx       using (gippDetectID)
       join StackApFlxFull   using (gippDetectID)
       where gPSFFlux > 1000
       limit 50
