postgresql7.1 and now()-r.refund_date <= timespan_days(1) and now()-r.refund_date <= timespan_days(7) and now()-r.refund_date <= '1 month'::interval