HosseinTop 10 user of Satellite money bridge in last month
    Updated 2022-11-26
    with main_table as (
    select
    t1.block_timestamp,
    t1.tx_id,
    t1.attribute_value as from_network,
    t2.attribute_value as from_address,
    t3.attribute_value as to_network,
    t4.attribute_value as to_address
    from axelar.core.fact_msg_attributes t1
    join axelar.core.fact_msg_attributes t4
    join axelar.core.fact_msg_attributes t2
    join axelar.core.fact_msg_attributes t3
    on t1.tx_id = t2.tx_id
    and t1.tx_id = t3.tx_id
    and t1.tx_id = t4.tx_id
    where 1 = 1
    and t1.attribute_key = 'sourceChain'
    and t2.attribute_key = 'sender'
    and t3.attribute_key = 'destinationChain'
    and t4.attribute_key = 'destinationAddress'
    and t1.tx_succeeded = 1
    )

    select
    from_address "User",
    count(distinct tx_id) "Transaction CNT",
    count(distinct to_address) "Unique To Address"
    from main_table
    where block_timestamp::date >= '{{ date }}'
    group by 1
    order by 2 desc
    limit 10
    Run a query to Download Data