这是我的 sql 选择查询:
SELECT
contact_individual.name,contact_individual.contactID_individual,
MAX(DATE_FORMAT(payment_individual.expiration,'%m/%d/%Y')) as exp1
FROM contact_individual,payment_individual
WHERE contact_individual.contactID_individual = payment_individual.contactID_individual
group by contact_individual.contactID_individual,contact_individual.name
having MAX(payment_individual.expiration)=DATE_ADD(current_date(), INTERVAL 1 MONTH)
在这种情况下,仅在到期日期为到期前 1 个月时才显示会员姓名。请帮助我,我想做的就是让它可用/或者是否可以在整个 30 天内显示成员的姓名。谢谢!