Advertisement
Guest User

Untitled

a guest
Apr 19th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. select DISTINCT num FROM
  2. (select num,
  3. case
  4. when @record = num then @count:=@count+1
  5. when @record <> @record:=num then @count:=1 end as n
  6. from
  7. Logs ,(select @count:=0,@record:=(SELECT num from Logs limit 0,1)) r
  8. ) a
  9. where a.n>=3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement