[IMP] improved query builder for content provider with join support