四:数据库(leetocde)
文章平均质量分 64
一枚卷毛
想要转入java行业的学生一枚,希望有更多的技术分享
展开
-
176. Second Highest Salary(Leetcode)
文章出处:http://www.cnblogs.com/grandyang/p/5348961.htmlWrite a SQL query to get the second highest salary from the Employee table.+----+--------+| Id | Salary |+----+--------+| 1 | 100 || 2转载 2017-11-03 13:05:53 · 244 阅读 · 0 评论 -
181. Employees Earning More Than Their Managers(Lettcode)
The Employee table holds all employees including their managers. Every employee has an Id, and there is also a column for the manager Id.+----+-------+--------+-----------+| Id | Name | Salary |原创 2017-11-03 14:18:53 · 156 阅读 · 0 评论 -
182. Duplicate Emails(Lettcode)
Write a SQL query to find all duplicate emails in a table named Person.+----+---------+| Id | Email |+----+---------+| 1 | [email protected] || 2 | [email protected] || 3 | [email protected] |+----+---------+For原创 2017-11-03 14:56:45 · 163 阅读 · 0 评论 -
196. Delete Duplicate Emails
Write a SQL query to delete all duplicate email entries in a table named Person, keeping only unique emails based on its smallest Id.+----+------------------+| Id | Email |+----+-----原创 2017-11-05 15:59:52 · 212 阅读 · 0 评论 -
197. Rising Temperature(Lettcode)
Given a Weather table, write a SQL query to find all dates' Ids with higher temperature compared to its previous (yesterday's) dates.+---------+------------+------------------+| Id(INT) | Date(DA原创 2017-11-05 16:39:25 · 204 阅读 · 0 评论 -
262. Trips and Users
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 theUsers table. Status is an ENUM type of (‘completed’, ‘cance原创 2018-01-31 13:12:42 · 210 阅读 · 0 评论 -
601. Human Traffic of Stadium
X city built a new stadium, each day many people visit it and the stats are saved as these columns:id, date, peoplePlease write a query to display the records which have 3 or more consecutive rows原创 2018-01-31 13:58:38 · 261 阅读 · 0 评论 -
185. Department Top Three Salaries
The Employee table holds all employees. Every employee has an Id, and there is also a column for the department Id.+----+-------+--------+--------------+| Id | Name | Salary | DepartmentId |+----原创 2018-01-29 16:06:23 · 327 阅读 · 0 评论