def METHOD_NAME(self, pii_label, query):
    """Add having clause to select query"""
    funs = [
        functions.Count,
        functions.Sum,
        functions.Avg,
        functions.Min,
        functions.Max,
        functions.Std,
        functions.StdDev,
    ]
    fun = self.get_random_val(funs)
    condition = random.randint(0, 10000)
    options = [
        fun(pii_label) >= condition,
        fun(pii_label) <= condition,
        fun(pii_label) == condition,
        fun(pii_label) != condition,
        fun(pii_label) > condition,
        fun(pii_label) < condition,
    ]
    query = query.having(self.get_random_val(options))
    return query