2 Star 8 Fork 41

19级软件1班 / 力扣刷题

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
连续出现的数据.sql 393 Bytes
一键复制 编辑 原始数据 按行查看 历史
姚振鑫 提交于 2020-05-12 10:37 . sql
Create table Logs
(
Id int primary key identity(1,1) not null,
Num int not null,
)
insert into Logs(Num) select 1
union all select 1
union all select 1
union all select 2
union all select 1
union all select 2
union all select 2
select distinct l1.Num as ConsecutiveNums from Logs l1, Logs l2, Logs l3
where l1.Id=l2.Id+1 and l2.Id=l3.Id+1 and l1.Num = l2.Num and l2.Num = l3.Num
SQL
1
https://gitee.com/grade19_soft_class1/leet_code_sql.git
git@gitee.com:grade19_soft_class1/leet_code_sql.git
grade19_soft_class1
leet_code_sql
力扣刷题
master

搜索帮助