jackguycosmo 200k
    Updated 2022-12-14
    with tab1 as (
    select *
    --distinct tx_id
    from cosmos.core.fact_msg_attributes
    WHERE attribute_key = 'proposal_id'
    and attribute_value = '82'
    )

    SELECT
    events,
    COUNT(*)
    FROM (
    SELECT
    attribute_value,
    count(DISTINCT tx_id) events
    from cosmos.core.fact_msg_attributes
    WHERE attribute_key LIKE 'sender'
    --FROM cosmos.core.fact_msg_attributes
    AND tx_id in (SELECT tx_id FROM tab1)
    GROUP BY 1
    )
    GROUP BY 1
    Run a query to Download Data