本题有SQL两种写法,两种写法的共同点都是在一个分组中应用 max() 函数
写法1,比较容易想到:
select max(gpa) from user_profile where university = '复旦大学'写法2:
select max(gpa) from user_profile group by university having university = '复旦大学'
select max(gpa) from user_profile where university = '复旦大学'写法2:
select max(gpa) from user_profile group by university having university = '复旦大学'