This query is already working:
SELECT itens.setor, xregras.nsetor, itens.grupo, xregras.ngrupo,
itens.conta, xregras.nconta, itens.dotacao,
sum(IF(tipo = 'ES',total,0.00)) as efetivado,
sum(IF(tipo = 'NE',total,0.00)) as...
asked by
09.10.2015 / 20:38