Wireless sensor networks with multiple users collecting data directly from the sensors have many potential applications. An important problem is to allocate for each user a query range to achieve certain global optimality while avoid congesting the sensors in the meanwhile. We study this problem for a ZigBee cluster tree by formulating it into a multi-dimensional multi-choice knapsack problem. Maximum overall query range and max-min fair query range objectives are investigated. Distributed algorithms are proposed which exploit the ZigBee cluster tree structure to keep the computation local. Extensive simulations show that the proposed methods achieve good approximation to the optimal solution with little overhead and improve the network performance.