sqlite3 - Retrieve maximum value for the last 10 records in objective c -


i want retrieve maximum value of last 10 records in sqlite database, use below query retrieve maximum value column not last 10, how can solve problem?

select ifnull(max(systolic),0)  pressureandhr order id desc limit 10; 

thank u,

try modify from

select ifnull(max(systolic),0) pressureandhr order id desc limit 10; 

to

select ifnull(max(systolic),0) (select * pressureandhr order id desc limit 10); 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -