I test sql and it works fine in Sqlite Spy:
select ifnull(_name, _number) as identifer, count(_id) as amount from call group by identifer
And I wanna use it in ContentConsolver but it can't work with "group by":
String[] projections = new String[] { "ifnull(name, number) as identifer", "count(_id) as amount" };
String group = "identifer";
//String selection = ") GROUP BY (" + group;
Cursor cursor = getContentResolver().query(CallLog.Calls.CONTENT_URI, projections, null, null, null /*!group*/ );
What should I do?