开发者

Get row count for most occurred field from content provider

开发者 https://www.devze.com 2023-02-22 14:59 出处:网络
When querying a content provider how to get the data that occures most number of times in a column. For example, Using the CallLog.Calls content provider if I want to get the phone number that occures

When querying a content provider how to get the data that occures most number of times in a column. For example, Using the CallLog.Calls content provider if I want to get the phone number that occures in the log the maximum number of times? I guess in SQL the way would be to do something like COUNT(NUMBER)) GROUP BY开发者_StackOverflow社区 NUMBER But, I suppose the query to content provider doesn't support GROUP BY (right?). What's the best way to achieve this? I want to get both the number of times the most used (most number of occurrences in the table) and also the number itself. Is it possible?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号