sql
sql编程
ataraxy_thinking
In me the tiger sniffs the rose.
展开
-
leetcode-181. 超过经理收入的员工
题目SQL架构:Create table If Not Exists Employee (Id int, Name varchar(255), Salary int, ManagerId int)Truncate table Employeeinsert into Employee (Id, Name, Salary, ManagerId) values ('1', 'Joe', '7...原创 2019-12-20 19:36:42 · 232 阅读 · 0 评论 -
leetcode-180. 连续出现的数字
题目SQL架构Create table If Not Exists Logs (Id int, Num int)Truncate table Logsinsert into Logs (Id, Num) values ('1', '1')insert into Logs (Id, Num) values ('2', '1')insert into Logs (Id, Num) va...原创 2019-12-15 14:52:27 · 250 阅读 · 0 评论 -
leetcode-178. 分数排名
题目SQL架构:Create table If Not Exists Scores (Id int, Score DECIMAL(3,2))Truncate table Scoresinsert into Scores (Id, Score) values ('1', '3.5')insert into Scores (Id, Score) values ('2', '3.65')...原创 2019-12-15 11:58:40 · 212 阅读 · 0 评论 -
leetcode-177. 第N高的薪水
题目编写一个 SQL 查询,获取 Employee 表中第 n 高的薪水(Salary)。±—±-------+| Id | Salary |±—±-------+| 1 | 100 || 2 | 200 || 3 | 300 |±—±-------+例如上述 Employee 表,n = 2 时,应返回第二高的薪水 200。如果不存在第 n 高的薪水...原创 2019-12-08 16:15:16 · 127 阅读 · 0 评论 -
leetcode-176. 第二高的薪水
题目SQL架构Create table If Not Exists Employee (Id int, Salary int)Truncate table Employeeinsert into Employee (Id, Salary) values ('1', '100')insert into Employee (Id, Salary) values ('2', '200')...原创 2019-12-08 15:41:50 · 153 阅读 · 0 评论 -
leetcode-175. 组合两个表
题目描述SQL架构Create table Person (PersonId int, FirstName varchar(255), LastName varchar(255))Create table Address (AddressId int, PersonId int, City varchar(255), State varchar(255))Truncate table ...原创 2019-12-06 16:09:39 · 181 阅读 · 0 评论