1.分组条件查询,查组内符合条件的
select id,member_id,scan_time,scan_province,scan_city,scan_area
from member_scan_property
where
scan_time in (select MAX(scan_time)
from member_scan_property group by member_id)
2.多级子查询最好带上查询字段,不用*
1.分组条件查询,查组内符合条件的
select id,member_id,scan_time,scan_province,scan_city,scan_area
from member_scan_property
where
scan_time in (select MAX(scan_time)
from member_scan_property group by member_id)
2.多级子查询最好带上查询字段,不用*