如何一条SQL从一张表中取出关联字段值分别为A/B/C的数据一个取出N条?
自问自答
SELECT * FROM s_area AS a WHERE area_parent_id in (3,4,5) and 5 > ( SELECT COUNT(*) FROM s_area WHERE area_parent_id = a.area_parent_id AND area_id>a.area_id) order by area_sort asc
2.1m questions
2.1m answers
60 comments
57.0k users