mlhUntitled Query
    Updated 2023-01-03
    with DestinationChainT as (select block_timestamp,--credit to ali3n
    tx_id,
    attribute_value as Destination_Chain
    from axelar.core.fact_msg_attributes
    where tx_succeeded = 'TRUE'
    and attribute_key = 'destinationChain'
    )
    select 'Axelar Satellite Bridge' as path,
    count (distinct tx_id) as trxs,
    count (distinct destination_user) as users
    from (select t1.block_timestamp
    block_timestamp,
    tx_id,
    Origin_Chain,
    Destination_Chain,
    Origin_User,
    Destination_User,
    Token_name,
    tokenn,
    Transfer_Path,
    amount,
    amount*USDPrice as USD_Volume
    from (select block_timestamp, tx_id, Origin_Chain, Destination_Chain, Origin_User, Destination_User, Token_name, Transfer_Path, tokenn,
    --Credit This Part: JackTheGuy
    case when tokenn like '%uaxl%' then cast(REPLACE(tokenn, 'uaxl', '') as INT) / power(10, 6)
    when tokenn like '%uusdc%' then cast(REPLACE(tokenn, 'uusdc', '') as INT) / power(10, 6)
    when tokenn like '%ibc/6F4968A73F90CF7DE6394BF937D6DF7C7D162D74D839C13F53B41157D315E05F%' then cast(REPLACE(tokenn, 'ibc/6F4968A73F90CF7DE6394BF937D6DF7C7D162D74D839C13F53B41157D315E05F', '') as INT) / power(10, 6)
    when tokenn like '%ibc/9117A26BA81E29FA4F78F57DC2BD90CD3D26848101BA880445F119B22A1E254E%' then cast(REPLACE(tokenn, 'ibc/9117A26BA81E29FA4F78F57DC2BD90CD3D26848101BA880445F119B22A1E254E', '') as INT) / power(10, 6)
    when tokenn like '%weth-wei%' then cast(REPLACE(tokenn, 'weth-wei', '') as INT) / power(10, 18)
    when tokenn like '%ibc/4627AD2524E3E0523047E35BB76CC90E37D9D57ACF14F0FCBCEB2480705F3CB8%' then cast(REPLACE(tokenn, 'ibc/4627AD2524E3E0523047E35BB76CC90E37D9D57ACF14F0FCBCEB2480705F3CB8', '') as INT) / power(10, 6)
    when tokenn like '%wbtc-satoshi%' then cast(REPLACE(tokenn, 'wbtc-satoshi', '') as INT) / power(10, 9)
    end as amount
    from (select t1.block_timestamp, t1.tx_id, Origin_Chain, Destination_Chain, Origin_User, Destination_User, Origin_Chain || ' To ' || Destination_Chain as Transfer_Path, attribute_value as tokenn,
    --Credit This Part: JackTheGuy
    case when attribute_value like '%uaxl%' then 'AXL'
    Run a query to Download Data