AHappyBird

IFNULL(exp1, exp2)

如果存在exp1则展示exp1,如果没有输出exp2

cast

convert 

 

# Write your MySQL query statement below
select DISTINCT
Num as ConsecutiveNums
from
(
select
Num,
( CASE WHEN Num = @curNum THEN @counter := @counter + 1 WHEN @curNum :=Num THEN @counter := 1 END ) as counter
from
Logs,
( select @curNum := NULL, @counter := 0 ) as q
) as a
where
counter >= 3

 

https://www.cnblogs.com/dannylinux/articles/8288790.html

分类:

技术点:

相关文章:

  • 2021-11-02
  • 2022-01-11
  • 2021-10-28
  • 2021-11-06
  • 2021-07-26
  • 2021-04-10
  • 2021-06-16
  • 2021-10-13
猜你喜欢
  • 2021-06-24
  • 2022-02-01
  • 2022-12-23
  • 2021-12-28
  • 2021-12-18
相关资源
相似解决方案