mlhUntitled Query
    Updated 2022-08-11
    select
    date_trunc('week', BLOCK_TIMESTAMP) as week,
    'ETH to Sol Bridge' as type,
    substring(INPUT_DATA, 202, 1) as chain_id,
    count(DISTINCT tx_hash) as trxs,
    count(DISTINCT from_address) as users,
    sum(trxs) over (order by week asc ) as cum_trxs,
    sum(users) over (order by week asc) as cum_users
    from ethereum.core.fact_transactions
    where to_address in (lower('0x3ee18b2214aff97000d974cf647e7c347e8fa585'))
    and origin_function_signature in ( '0x0f5287b0','0x9981509f')
    and chain_id = '1'
    group by 1,2,3
    UNION
    select
    date_trunc('week', BLOCK_TIMESTAMP) as week,
    'Sol to ETH Bridge' as type,
    substring(INPUT_DATA, 202, 1) as chain_id,
    count(DISTINCT tx_hash) as trxs,
    count(DISTINCT from_address) as users,
    sum(trxs) over (order by week asc ) as cum_trxs,
    sum(users) over (order by week asc) as cum_users
    from ethereum.core.fact_transactions
    where to_address in (lower('0x3ee18b2214aff97000d974cf647e7c347e8fa585'))
    and origin_function_signature = '0xc6878519'
    and chain_id = '1'
    group by 1,2,3
    Run a query to Download Data