Hello, I'm a newbie to Android. Actually, I want to query data from Media provider with Content provider & content resolver.
c = mContent.query(CONTENT_URI,projection,where,null,null);
My question is, I want to query data from media provider as below
select DISTINCT _id, count(_id), _data FROM aaa_table WHERE _data LIKE "A" OR _data LIKE "B" GROUP BY _id;
I set, 1. projection :
final String[] projection = new String[] {
"_id",
"COUNT ("+ _id +")" ,
"_data"
};
where
_data LIKE "A" OR _data LIKE "B"
but, I couldn't find how to set the query option "GROUP BY _id".
Please help me.