题解 | 查找GPA最高值
查找GPA最高值
https://www.nowcoder.com/practice/4e22fc5dbd16414fb2c7683557a84a4f
-- 方法1,max
select
max(gpa) gpa
from
user_profile
where
university = "复旦大学";
-- 方法二,排序,限制
select
gpa
from
user_profile
where
university = "复旦大学"
order by
gpa desc
limit
1;
-- 方法三,round
select
round(max(gpa),1) gpa
from
user_profile
where
university = "复旦大学";
-- 方法四,format
select
format(max(gpa),1) gpa
from
user_profile
where
university = "复旦大学";
莉莉丝游戏公司福利 788人发布