LeetCode(数据库)- The Airport With the Most Traffic

简介: LeetCode(数据库)- The Airport With the Most Traffic

题目链接:点击打开链接

题目大意:略。

解题思路:略。

AC 代码


WITH t AS(SELECT departure_airport id, flights_count cnt FROM Flights
UNION ALL
SELECT arrival_airport, flights_count FROM Flights),
tt AS(SELECT id, RANK() OVER(ORDER BY SUM(cnt) DESC) rk
FROM t
GROUP BY 1)
SELECT id airport_id
FROM tt
WHERE rk = 1
目录
相关文章
|
5月前
|
人工智能 容器
Leetcode 11. Container With Most Water
题目可以这么理解,在i位置有条高为ai的竖线,让你选出两台竖线构成一个容器,使得该容器装的水最多,注意容器不能倾斜。
25 3
|
数据库
数据库LeetCode每日练习(三)
数据库LeetCode每日练习(三)
数据库LeetCode每日练习(三)
|
SQL 数据库
数据库LeetCode每日练习(二)
数据库LeetCode每日练习(二)
数据库LeetCode每日练习(二)
|
SQL 数据库
数据库LeetCode每日练习(一)
数据库LeetCode每日练习(一)
数据库LeetCode每日练习(一)
|
数据库
LeetCode(数据库)- 2142. The Number of Passengers in Each Bus I
LeetCode(数据库)- 2142. The Number of Passengers in Each Bus I
160 0
|
数据库
LeetCode(数据库)- The Number of Seniors and Juniors to Join the Company II
LeetCode(数据库)- The Number of Seniors and Juniors to Join the Company II
80 0
|
数据库
LeetCode(数据库)- Number of Accounts That Did Not Stream
LeetCode(数据库)- Number of Accounts That Did Not Stream
89 0
|
数据库
LeetCode(数据库)- The Category of Each Member in the Store
LeetCode(数据库)- The Category of Each Member in the Store
83 0
|
数据库
LeetCode(数据库)- First and Last Call On the Same Day
LeetCode(数据库)- First and Last Call On the Same Day
84 0
|
21天前
|
机器学习/深度学习 算法
力扣刷题日常(一)
力扣刷题日常(一)
20 2