关闭

LeetCode 数据库262,601整理

The Trips table holds all taxi trips. Each trip has a unique Id, while Client_Id and Driver_Id are both foreign keys to the Users_Id at the Users table. Status is an ENUM type of (‘completed’, ‘cancell...
阅读(212) 评论(0)

LeetCode 数据库181,182,183,184,185整理

181. Employees Earning More Than Their ManagersThe Employee table holds all employees including their managers. Every employee has an Id, and there is also a column for the manager Id.+----+-------+---...
阅读(109) 评论(0)

180.Consecutive_Numbers

Write a SQL query to find all numbers that appear at least three times consecutively.#+----+-----+ #| Id | Num | #+----+-----+ #| 1 | 1 | #| 2 | 1 | #| 3 | 1 | #| 4 | 2 | #| 5 | 1 | #| 6...
阅读(123) 评论(0)

178.Rank_Scores

Write a SQL query to rank scores. If there is a tie between two scores, both should have the same ranking. Note that after a tie,the next ranking number should be the next consecutive integer value. #+...
阅读(130) 评论(0)

177.Nth_Highest_Salary

Write a SQL query to get the nth highest salary from the Employee table.#+----+--------+ #| Id | Salary | #+----+--------+ #| 1 | 100 | #| 2 | 200 | #| 3 | 300 | #+----+--------+For example...
阅读(107) 评论(0)
    个人资料
    • 访问:893839次
    • 积分:13005
    • 等级:
    • 排名:第1092名
    • 原创:307篇
    • 转载:439篇
    • 译文:56篇
    • 评论:93条
    博客专栏
    文章分类
    打赏
    如果你觉得我的文章对您有用,请随意打赏。 微信 支付宝