run histogram query