问题描述
- sqlite获取数据的平均值
-
执行下面的查询:String selectQuery = "SELECT max(score),name FROM " + TABLE_SCORE +" group by name";
输出的值都是随机的,我需要它们从大到小排列。应该怎么实现?
解决方案
select max(score) as nscore, name
from TABLE_XXX
group by name
order by nscore desc
时间: 2024-11-01 14:14:39