PostgreSQL donde el mes y el año de Datetrunc es igual a

... WHERE date_trunc('month', b.col) = date_trunc('month', a.col);
GutoTrosla