Fix coupons by date queries to prevent inflated results

Closes #6742