https://leetcode.cn/problems/percentage-of-users-attended-a-contest/?envType=study-plan-v2&envId=sql-free-50 聚合函数分组后计算的是一组内的数据,分组前我们认为所有数据是一组 本题注意还需要嵌套语句 select contest_id, round(count(user_id)/(selectcount(user_id)fromUsers)100,2)aspercentage fromRegister groupbycontest_id orderbypercentagedesc...

  vNoNpGJB1x08   2023年12月26日   101   0   0 Java
关注 更多

空空如也 ~ ~

粉丝 更多

空空如也 ~ ~