sql - Mysql retrieving range between 2 max values -


i'm trying retrieve range of values between last row in table , row 40 rows above it: 2568, 2567, 2566, etc. query i'm using not getting done:

select * posts  front_weight  between 'max(front_weight)-40' , 'max(front_weight)' 

from wording assume front_weight unique? if can use:

select * posts order front_weight desc limit 40 

Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -