SELECT i.year, i.quarter, i.type, i.message
FROM INFO i
JOIN INFO iy
ON i.type = iy.type
JOIN INFO iq
ON iq.type = iy.type
WHERE i.type IN (1,2)
GROUP BY i.year, i.quarter, i.type, i.message
HAVING i.year = MAX(iy.year) AND i.quarter = MAX(iq.quarter)