Ver originalSELECT v.dni_cliente, SUM(v.unidades*m.precio) as importeFROM ventas_vista as v INNER JOIN medicamento as mON v.cod_med=m.cod_med GROUP BY v.dni_cliente ORDER BY importe ASC LIMIT 0,1