android中sqlite distinct中使用多个字段的方法

select 要使用字段1,要使用字段2 from 表名 where id in (select min(id) from 表名 group by 不重复字段名)

比如:

 select myid,id from chat where id in (select min(id) from chat group by myid)

原文地址:https://www.cnblogs.com/tqj-zyy/p/4559764.html