I try to run this query on my custom contentprovider.
cursor = activity.getContentResolver().query( GoalDescriptor.CONTENT_URI,
In my case the answer of nEx actually worked, but I forgot to also add "max_"+COLUMN_NAME within the getColumnIndexByName() method of the cursor.
After I figured out this had also to be changed, it finally worked!