Skip to content

Commit a886cbd

Browse files
add 2072
1 parent 9d171e4 commit a886cbd

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

database/_2072.sql

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
-- Write your PostgreSQL query statement below
2+
3+
4+
with excellent_std_cnts as (select (select count(student_id) from NewYork where score >= 90) as ny,
5+
(select count(student_id) from California where score >= 90) as ca)
6+
7+
select (case
8+
when E.ny > E.ca then 'New York University'
9+
when E.ny < E.ca then 'California University'
10+
else 'No Winner'
11+
end
12+
) as winner
13+
from excellent_std_cnts as E

paginated_contents/database/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
| 2990 |[Loan Types](https://leetcode.com/problems/loan-types/)| [Solution](https://github.com/fishercoder1534/Leetcode/blob/master/database/_2990.sql) || Easy |
66
| 2205 |[The Number of Users That Are Eligible for Discount](https://leetcode.com/problems/the-number-of-users-that-are-eligible-for-discount/)| [Solution](https://github.com/fishercoder1534/Leetcode/blob/master/database/_2205.sql) || Easy |
77
| 2082 |[The Number of Rich Customers](https://leetcode.com/problems/the-number-of-rich-customers/)| [Solution](https://github.com/fishercoder1534/Leetcode/blob/master/database/_2082.sql) || Easy |
8+
| 2072 |[The Winner University](https://leetcode.com/problems/the-winner-university/)| [Solution](https://github.com/fishercoder1534/Leetcode/blob/master/database/_2072.sql) || Easy |
89
| 1789 |[Primary Department for Each Employee](https://leetcode.com/problems/primary-department-for-each-employee/)| [Solution](https://github.com/fishercoder1534/Leetcode/blob/master/database/_1789.sql) || Easy |
910
| 1757 |[Recyclable and Low Fat Products](https://leetcode.com/problems/recyclable-and-low-fat-products/)| [Solution](https://github.com/fishercoder1534/Leetcode/blob/master/database/_1757.sql) || Easy |
1011
| 1741 |[Find Total Time Spent by Each Employee](https://leetcode.com/problems/find-total-time-spent-by-each-employee/)| [Solution](https://github.com/fishercoder1534/Leetcode/blob/master/database/_1741.sql) || Easy |

0 commit comments

Comments
 (0)