Ver originalSELECT *, SUM(importe) AS TOTAL2 FROM cobros_ab WHERE fechacobro='2013-03-10' AND atiende='admin' IN (SELECT codalbaran FROM albalinea WHERE(codigo BETWEEN 1 AND 2) HAVING COUNT(*)>=1)