def antenna_interactions_agg_query(table_name='%(table_name)s'):
    """
    Aggregated dataframe of antenna interactions over all chunks.

    Inputs
    ------
    table_name : name of the table the query is supposed to run on,
                 defaulting to '%(table_name)s', i.e. no substitution

    Output
    ------
    Aggregated dataframe of antenna interactions over all chunks.
    """
    query = """
        SELECT
          antenna_id1,
          antenna_id2,
          SUM(sms_count) as sms_count,
          SUM(call_count) as call_count,
          SUM(vol_sum) as vol_sum
        FROM %(table_name)s
        GROUP BY antenna_id1, antenna_id2
    """
    return query % {'table_name': table_name}
