Is there any logical function (IF ????) to translate this sentence???
SELECT MONTH(MLPL.FechaComprobante) AS Mes,
SUM(IF(CLP.DebitoCredito='C',MLPL.Importe,0)) AS Haberes,
SUM(IF(CLP.DebitoCredito='D',MLPL.Importe,0)) AS Deducciones,
SUM(IF(CLP.CodigoConceptoLiqProf=270,MLPL.Importe,0)) AS InstBecario,
SUM(IF(CLP.CodigoConceptoLiqProf=395,MLPL.Importe,0)) AS Ganancias
FROM MovimientosLiqProfesionales MLP INNER JOIN
MovimientosLiqProfesionalesLiquidados MLPL
ON MLP.CodigoMovLiqProf=MLPL.CodigoMovLiqProf
INNER JOIN ConceptosLiqProfesionales CLP
ON MLP.CodigoConceptoLiqProf=CLP.CodigoConceptoLiqProf
WHERE ...
Attachment: [text/html]
Attachment: [text/html]