LeetCode(数据库)- The Winner University

Posted 程序员牧码

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了LeetCode(数据库)- The Winner University相关的知识,希望对你有一定的参考价值。

题目链接:点击打开链接

题目大意:略。

解题思路:略。

AC 代码

WITH t1 AS(SELECT COUNT(*) s1 FROM NewYork WHERE score >= 90),

t2 AS(SELECT COUNT(*) s2 FROM California WHERE score >= 90)

SELECT CASE 
WHEN s1 > s2 THEN 'New York University'
WHEN s1 < s2 THEN  'California University'
ELSE 'No Winner' END winner
FROM t1, t2

以上是关于LeetCode(数据库)- The Winner University的主要内容,如果未能解决你的问题,请参考以下文章

[LeetCode] Predict the Winner 预测赢家

[Leetcode] DP-- 486. Predict the Winner

[leetcode]Minimax-486. Predict the Winner

LN : leetcode 486 Predict the Winner

leetcode486 Predict the Winner

LeetCode 1823: Find the Winner of the Circular Game (约瑟夫环问题)