tengo una tabla asi
id, importe, cantidad
el importe peude ser positivo como negativo, entonces encesito hacer algo asi
Código:
bu espero me haya podido ahcer entender.select id, cantidad, if (importe >0) then sum(importe) end if as positivo if (importe < 0) then sum(abs(importe)) end if as negativo
salu2 y gracias