摘要: 184. 部门工资最高的员工 LeetCode_MySql_184 题目描述 题解分析 1.首先需要使用group by找出工资最高的值 2. 然后考虑到最高工资的可能有多位,所以使用in语句找到所有符合条件的员工 3. 最外层使用连接连表查询员工所在的部门名字。 代码实现 # Write your 阅读全文
posted @ 2021-03-02 20:05 Garrett_Wale 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 183. 从不订购的客户 LeetCode_MySql_183 题目描述 代码实现 # Write your MySQL query statement below select Name as 'Customers' from Customers where Customers.Id not in 阅读全文
posted @ 2021-03-02 19:14 Garrett_Wale 阅读(42) 评论(0) 推荐(0) 编辑
摘要: 182. 查找重复的电子邮箱 LeetCode_MySql_182 题目描述 方法一:使用笛卡尔积 # Write your MySQL query statement below select distinct t1.Email from Person t1, Person t2 where t1 阅读全文
posted @ 2021-03-02 18:28 Garrett_Wale 阅读(84) 评论(0) 推荐(0) 编辑
摘要: MySQL中的存储引擎 一、存储引擎 1、存储引擎其实就是对于数据库文件的一种存取机制,如何实现存储数据,如何为存储的数据建立索引以及如何更新,查询数据等技术实现的方法。 2、MySQL中的数据用各种不同的技术存储在文件(或内存)中,这些技术中的每一种技术都使用不同的存储机制,索引技巧,锁定水平并且 阅读全文
posted @ 2021-03-02 12:15 Garrett_Wale 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 181. 超过经理收入的员工 LeetCode_MySql_181 题目描述 方法一:笛卡尔积 # Write your MySQL query statement below select e1.Name as 'Employee' from Employee e1, Employee e2 wh 阅读全文
posted @ 2021-03-02 11:12 Garrett_Wale 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 180. 连续出现的数字 LeetCode_MySql_180 题目描述 代码实现 # Write your MySQL query statement below select distinct t1.num as ConsecutiveNums from Logs t1, Logs t2, Lo 阅读全文
posted @ 2021-03-02 10:46 Garrett_Wale 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 178. 分数排名 LeetCode_MySql_178 题目描述 题解分析 排名函数 DENSE_RANK()。如果使用 DENSE_RANK() 进行排名会得到:1,1,2,3,4。 RANK()。如果使用 RANK() 进行排名会得到:1,1,3,4,5。 ROW_NUMBER()。如果使用 阅读全文
posted @ 2021-03-02 10:33 Garrett_Wale 阅读(97) 评论(0) 推荐(0) 编辑