Select * From records where DATEDIFF(NOW(),datetime) < 7 and type='spo2' and value > 0 and uid='376896' order by rid desc