I need to calculate aggregate columns but not add them are independent calculations but whitin the same colum
(sum(if(CTA IN ( 5405 , 5408 , 5409 , 5495 , 5496 ), debe01, 0)) + sum(if(CTA IN ( 5405 , 5408 , 5409 , 5495 , 5496 ), haber01, 0)) + (sum(if(cia_id = 66
AND (CTA IN ( 5410 , 5412 ))
AND (SCTA = 10), debe01, 0))) + (sum(if(cia_id = 66
AND (CTA IN ( 5410 , 5412 ))
AND (SCTA = 10), haber01, 0))))
(sum(if(CTA IN ( 5405 , 5408 , 5409 , 5495 , 5496 ), debe01, 0))
+ sum(if(CTA IN ( 5405 , 5408 , 5409 , 5495 , 5496 ), haber01, 0)) + (sum(if(cia_id = 62
AND (CTA IN ( 5410 , 5412 ))
AND (SCTA = 120), debe01, 0))) + (sum(if(cia_id = 62
AND (CTA IN ( 5410 , 5412 ))
AND (SCTA = 120), haber01, 0)))) as Gasto_admon