Fix the database query to return all pending jobs in a given time
interval.