四:数据库(leetocde)
文章平均质量分 70
一枚卷毛
想要转入java行业的学生一枚,希望有更多的技术分享
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
176. Second Highest Salary(Leetcode)
文章出处:http://www.cnblogs.com/grandyang/p/5348961.html Write a SQL query to get the second highest salary from the Employee table. +----+--------+ | Id | Salary | +----+--------+ | 1 | 100 | | 2转载 2017-11-03 13:05:53 · 339 阅读 · 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 · 221 阅读 · 0 评论 -
182. Duplicate Emails(Lettcode)
Write a SQL query to find all duplicate emails in a table named Person. +----+---------+ | Id | Email | +----+---------+ | 1 | a@b.com | | 2 | c@d.com | | 3 | a@b.com | +----+---------+ For原创 2017-11-03 14:56:45 · 238 阅读 · 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 · 291 阅读 · 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 · 261 阅读 · 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 the Users table. Status is an ENUM type of (‘completed’, ‘cance原创 2018-01-31 13:12:42 · 289 阅读 · 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, people Please write a query to display the records which have 3 or more consecutive rows原创 2018-01-31 13:58:38 · 337 阅读 · 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 · 400 阅读 · 0 评论
分享