Add query for sampling a data set