每日sql-连续出现的数字和薪水超过经理的员工
一、写sql找出连续出现三次的数字
select * from Logs i1,Logs i2, Logs i3 where i3.Id = i2.Id+1 and
i3.Num = i2.Num and i2.Id = i1.Id +1 and i2.Num=i1.Num;
二、薪水超过经理的员工
select a.name from employee_5 a join employee_5 b on a.managerid=b.id where a.salary >b.salary;