2

我想检索数据库maximum value中的最后 10 条记录sqlite,我使用下面的查询,但它检索的maximum value不仅仅是column最后 10 条,我该如何解决这个问题?

select ifnull(Max(Systolic),0)  from PressureAndHR order by ID desc limit 10;

感谢你,

4

1 回答 1

2

尝试从修改

select ifnull(Max(Systolic),0) from PressureAndHR order by ID desc limit 10;

SELECT ifnull(Max(Systolic),0) FROM (SELECT * PressureAndHR ORDER by ID DESC limit 10);
于 2013-04-18T10:48:11.083 回答