![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SQL
文章平均质量分 64
Vicky-一名菜鸟咨询顾问
SAP BW HANA ABAP BO BI工程师
第一次开blog有点小兴奋有点小激动,以前只是潜伏在各种论坛,寻找各种需要的东西。
现在自己也总结出来,供自己大家参考,不完善的地方,还望指出来
展开
-
LeetCode刷题笔记 - 175.Combine Two Tables
2018-10-09在LeetCode上刷MySQL数据库的题。以下序号与LeetCode上的题目序号保持一致,方便以后自己查看。根据每道题考察的内容,来扩展知识点。每天记录刷题内容、笔记、心得。目录175.Combine Two TablesDescription:Solution:总结:(1)inner join 内联结(等值联结):(2)out...原创 2018-10-09 18:02:30 · 278 阅读 · 0 评论 -
一文读懂Hive分析窗口函数(hive做累计、分组、排序、层次等计算)
转载:https://blog.csdn.net/abc200941410128/article/details/78408942#分析窗口函数应用场景:(1)用于分区排序(2)动态Group By(3)Top N(4)累计计算(5)层次查询Hive中提供了越来越多的分析函数,用于完成负责的统计分析。大致可以分为以下四类:Hive分析窗口函数(一) SUM,AVG,MIN,MAX...转载 2019-07-22 19:51:19 · 2253 阅读 · 0 评论 -
[Oracle]Lead和Lag偏移量函数使用详解
数据库学习网站 https://www.itkc8.comOracle有两个函数:LEAD和LAG,这两个函数都是用来计算偏移量的分析函数,这两个函数的用法相同。Oracle官方文档解释是:LEAD is an analytic function. It provides access to more than one row of a table at the same time with...转载 2019-06-22 17:19:41 · 1289 阅读 · 0 评论 -
LeetCode刷题笔记 - 185.Department Top Three Salary
2018-10-30185.Department Top Three Salaries文章目录185.Department Top Three Salaries一、Description:二、Solution:解法一:解法二:解法三:解法四:三、总结知识点:1、ALTER、UPDATE语法一、Description:The Employee table holds all employee...原创 2018-11-02 15:30:26 · 248 阅读 · 0 评论 -
LeetCode刷题笔记 - 183. Customers Who Never Order
2018-10-30183.Customers Who Never Order文章目录183.Customers Who Never Order一、Description:二、Solution:解法一:解法二:解法三:三、总结知识点:1、NOT IN2、IS NULL3、NOT EXISTS一、Description:Suppose that a website contains two ...原创 2018-10-30 15:48:10 · 167 阅读 · 0 评论 -
LeetCode刷题笔记 - 184.Department Highest Salary
2018-10-30184.Department Highest Salary文章目录184.Department Highest Salary一、Description:二、Solution:解法一:解法二:解法三:三、总结知识点:1、ALTER、UPDATE语法一、Description:The Employee table holds all employees. Every emp...原创 2018-10-31 20:41:58 · 240 阅读 · 0 评论 -
LeetCode刷题笔记 - 182. Duplicate Emails
2018-10-22182.Duplicate Emails文章目录182.Duplicate Emails一、Description:二、Solution:解法一:解法二:三、总结知识点:1、过滤数据:Where子句(1)、WHERE子句操作符a、检查单个值b、 不匹配检查c、 范围值检查d、 空值检查(2)、高级数据过滤-组合 WHERE 子句a、 AND 操作符b、 OR操作符2、Gro...原创 2018-10-29 17:51:52 · 370 阅读 · 0 评论 -
LeetCode刷题笔记 - 181. Employee Earning More Than Their Managers
2018-10-22181.Employee Earning More Than Their Managers文章目录181.Employee Earning More Than Their Managers一、Description:二、Solution:解法一:解法二:一、Description:The Employee table holds all employees includ...原创 2018-10-22 14:03:51 · 331 阅读 · 0 评论 -
LeetCode刷题笔记 - 180. Consecutive Numbers
2018-10-22180.Rank Scores文章目录180.Rank Scores一、Description:二、Solution:解法一:解法二:一、Description:Write a SQL query to find all numbers that appear at least three times consecutively.+----+-----+| Id |...原创 2018-10-22 11:02:31 · 157 阅读 · 0 评论 -
LeetCode刷题笔记 - 177. Nth Highest Salary
2018-10-11177. Nth Highest Salary一、Description:Write a SQL query to get the nth highest salary from the Employee table.+----+--------+| Id | Salary |+----+--------+| 1 | 100 || 2 | 200 ...原创 2018-10-17 10:59:37 · 429 阅读 · 0 评论 -
LeetCode刷题笔记 - 178. Rank Scores
2018-10-17178.Rank Scores文章目录178.Rank Scores一、Description:二、Solution:解法一:解法二:解法三:解法三:解法四:一、Description:Write a SQL query to rank scores. If there is a tie between two scores, both should have the ...原创 2018-10-22 11:02:42 · 207 阅读 · 0 评论 -
LeetCode刷题笔记 - 176.Second Highest Salary
2018-10-10176.Second Highest SalaryWrite a SQL query to get the second highest salary from the Employee table.±—±-------+| Id | Salary |±—±-------+| 1 | 100 || 2 | 200 || 3 | 300 |...原创 2018-10-10 20:12:19 · 420 阅读 · 0 评论 -
SQL 查找某列连续的几个值是否相同
我有一个table类似下面name item value rectimeA 001 0.98 2013/7/24 12:12:30A 002 0.98 2013/7/23 09:06:50A 002 0.95 2013/7/23 08:00:00B 004 0.95 2013/7/24 10:10:30B 00...转载 2019-08-15 11:42:13 · 1243 阅读 · 0 评论