Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select *
- from (
- select files.*, @new:=(@new or id=20 or date < 1548068216) new
- from files, (select @new:=0) x
- where date<=1548068216 order by date DESC
- limit 50
- ) y
- where new=1
- order by date DESC
- limit 20
Add Comment
Please, Sign In to add comment