History table + WHERE filter — detecting the Closed-Won-reopen anti-pattern that inflates pipeline reports