function from repository PointCloud_In_DB, to compute range over an attribute foa  aptch