说我指定了非布尔类型的表达式
select * from reservation group by reservation _id having min (check _in_date)
select * from reservation
where check_in_date
in (select min(check_in_date) from reservation group by reservation_id)
having 后边要跟一个布尔类型,能返回真假的语句,min (check _in_date)只是查询出最小值,无法表示布尔
select * from reservation
where (reservation_id,check_in_date)
in (select reservation_id,min(check_in_date) from reservation group by reservation_id)
谢谢大家,我明晚去电脑上试一下!