Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.
Select A.dc,A.rc,B.acctno, ((Sum(If(B.ttc In ('X','Y','Z'), 0, B.ua))) - (Sum(If(B.ttc In ('X','Y','Z'), B.ua, 0)))) As Total_UA, (Sum(C.cub)) As Total_CUB From Table_B As B Left Join Table_C As C On B.acctno = C.acctno Left Join Table_A As A On B.acctno = A.acctno Where A.status != 'C' Group By B.acctno Having Abs(Total_UA - Total_CUB) > 0.0001
Join the community of 500,000 technology professionals and ask your questions.