mariyaCompare protocols
    Updated 2022-03-11
    with lst_wallets_90 as (
    select tx_from[0] as wallet
    ,min(block_timestamp)::date as min_date
    from terra.transactions
    group by 1
    having min_date>=CURRENT_DATE-90
    )
    ,lst_tx_id as (
    select DISTINCT tx_id from terra.transactions
    where tx_from[0] in(select wallet from lst_wallets_90)
    )

    ,lst_count_wormhole as (
    select BLOCK_TIMESTAMP::date as day
    ,count(DISTINCT tx_id) as tx_count
    from terra.msgs
    where msg_value:contract::string ='terra10nmmwe8r3g99a9newtqa7a75xfgs2e8z87r2sf' --wormhole
    and tx_id in(select tx_id from lst_tx_id)
    group by 1
    order by 1
    )
    ,lst_count_Pylon as (
    select BLOCK_TIMESTAMP::date as day
    ,count(DISTINCT tx_id) as tx_count
    from terra.msgs
    where msg_value:contract::string ='terra1kcthelkax4j9x8d3ny6sdag0qmxxynl3qtcrpy' --Pylon
    and tx_id in(select tx_id from lst_tx_id)
    group by 1
    order by 1
    )
    ,lst_count_Astroport as (
    select BLOCK_TIMESTAMP::date as day
    ,count(DISTINCT tx_id) as tx_count
    from terra.msgs
    where msg_value:contract::string ='terra1xj49zyqrwpv5k928jwfpfy2ha668nwdgkwlrg3' --Astroport
    and tx_id in(select tx_id from lst_tx_id)
    Run a query to Download Data