Ver originalSELECT SUM(items) FROM ( SELECT items FROM tabla WHERE estado = 0 AND YEAR(doc_fecha)='2014' AND tipo = 1 OR tipo = 2 OR tipo =3)t