练习题目来自牛客网sq在线编程 非技术快速入门分组排序练习题_牛客题霸_牛客网 (nowcoder.com)
测试用例
create database nk_test; //创建数据库
use nk_test; //进入数据库
-- 创建测试表
drop table if exists user_profile;
CREATE TABLE `user_profile` (
`id` int,
`device_id` int,
`gender` STRING,
`age` int ,
`university` STRING,
`gpa` float,
`active_days_within_30` float,
`question_cnt` float,
`answer_cnt` float
);
-- 向测试表中插入数据
INSERT INTO user_profile VALUES(1,2138,'male',21,'北京大学',3.4,7,2,12);
INSERT INTO user_profile VALUES(2,3214,'male',null,'复旦大学',4.0,15,5,25);
INSERT INTO user_profile VALUES(3,6543,&