@staticmethod
def prepare_filter(couples):
    """
        Prepares the filter in order to fill the count table

        :param couples: (tag, value) couples
        :return: Str query of the corresponding filter
        """
    query = ''
    and_to_write = False
    for couple in couples:
        tag = couple[0]
        value = couple[1]
        if and_to_write:
            query += ' AND '
        and_to_write = True
        query += '({' + tag + '} == "' + str(value) + '")'
    query = '(' + query + ')'
    return query
