【【【结果待处理】】】 现有用户表user_profile(device_id 设备号, gender 性别, age 年龄, university 学校, gpa 绩点, active_days_within_30 近30天活跃天数, question_cnt 提问数, answer_cnt 答题数),示例数据如下: 请输出学生数不大于2的学校里的学生情况,包含学生数、学生设备ID列表(多个ID用分号;隔开),示例数据输出如下:
示例1

输入

drop table if exists user_profile;
CREATE TABLE `user_profile` (
	`id` int PRIMARY KEY AUTO_INCREMENT,
	`device_id` varchar(8) NOT NULL,
	`gender` varchar(14) NOT NULL,
	`age` int,
	`university` varchar(32) NOT NULL,
	`gpa` double,
	`active_days_within_30` int ,
	`question_cnt` int ,
	`answer_cnt` int 
);

INSERT INTO user_profile(device_id, gender, age, university, gpa, active_days_within_30, question_cnt, answer_cnt) VALUES
	(2138,'male',21,'北京大学',3.8,7,2,12),
	(3214,'male',24,'北京大学',3.7,15,5,25),
	(4321,'male',21,'复旦大学',3.8,9,6,52);

输出

university|cnt|device_list
北京大学|2|2138;3214
复旦大学|1|4321
加载中...