postgresql trunc dya code example Example: postgresql where datetrunc month and year equal ... WHERE date_trunc('month', b.col) = date_trunc('month', a.col);