postgresql trucante date to day code example
Example: postgresql where datetrunc month and year equal
... WHERE date_trunc('month', b.col) = date_trunc('month', a.col);
... WHERE date_trunc('month', b.col) = date_trunc('month', a.col);