android - Query Content Resolver get all logs between two days -


i want create query contentresolver return call logs (name, number, photo) between specified time, needs sorted number of counts. mysql query like:

select count(*) counts, calllog.calls.cached_name,   calllog.calls.number, calllog.calls.cached_photo_id calls calllog.calls.date > '2016-02-02' , calllog.calls.date < '2016-02-04' group calllog.calls.cached_name order counts desc; 

this how made query, need group by , order:

cursor cur = .getcontentresolver()   .query(calluri, null, calllog.calls.date + " between ? , ?", wherevalue, null); 

can please me add group by name , order by count of each item?


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -