
sql
Simmu
这个作者很懒,什么都没留下…
展开
-
leetcode 574. 当选者
表: Candidate+-----+---------+| id | Name |+-----+---------+| 1 | A || 2 | B || 3 | C || 4 | D || 5 | E |+-----+---------+ 表: Vote+-----+------...原创 2019-12-14 10:23:33 · 417 阅读 · 0 评论 -
leetcode 184. 部门工资最高的员工
# Write your MySQL query statement belowselect t2.name as Department,t1.name as Employee,t1.Salary from Employee t1inner joinDepartment t2on t1.DepartmentId=t2.Idwhere (t1.Salary,t1.Departmen...原创 2019-12-07 14:02:52 · 128 阅读 · 0 评论 -
leetcode mysql 178. 分数排名
# Write your MySQL query statement belowselect t1.Score,count(distinct t2.Score)+1 as RankfromScores as t1left joinScores as t2ont1.Score<t2.Scoregroup by t1.IDorder by Rank asc原创 2019-12-07 13:59:55 · 106 阅读 · 0 评论 -
[牛客网sql练习]查找当前薪水详情以及部门编号dept_no
--正确的sqlselect t2.*,t1.dept_no from (select * from salaries ) t2left join(select * from dept_manager) t1on t1.emp_no=t2.emp_no where t1.to_date='9999-01-01'and t2.to_date='9999-01-01'answer...原创 2019-10-11 22:47:15 · 178 阅读 · 0 评论