SELECT * FROM ( SELECT (@i:=@i+1) as i, id, data_send_time FROM jl_pims_machine_time mt,(select @i:=0) as it order by mt.id desc) tmpWHERE i IN (1,3,5)