def METHOD_NAME(self):
    filters = [self.direction.get_filter_clause()]
    if self.exclude_self_calls:
        filters.append("subscriber != msisdn_counterpart")
    where_clause = make_where(filters)
    sql = f"""
    SELECT
       subscriber,
       COUNT(*) AS value
    FROM (
        SELECT DISTINCT subscriber, msisdn_counterpart
        FROM ({self.unioned_query.get_query()}) AS U
        {where_clause}
    ) AS U
    GROUP BY subscriber
    """
    return sql