Use min_date instead of max_date to reduce the number of returned loan ids