题解 | #学生数不大于2的学校的学生情况#
学生数不大于2的学校的学生情况
https://www.nowcoder.com/practice/183822a9122642c491c61ec4d479fddb
select university,
count(device_id) as cnt,
group_concat(distinct device_id order by id asc separator';') as device_list
from user_profile
group by university
having count(device_id)<3
count(device_id) as cnt,
group_concat(distinct device_id order by id asc separator';') as device_list
from user_profile
group by university
having count(device_id)<3