Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select DISTINCT num FROM
- (select num,
- case
- when @record = num then @count:=@count+1
- when @record <> @record:=num then @count:=1 end as n
- from
- Logs ,(select @count:=0,@record:=(SELECT num from Logs limit 0,1)) r
- ) a
- where a.n>=3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement