Tony_Intel2023-07-16 09:03 PM
    Updated 2023-07-16
    with price as (
    select p.blockchain, decimals, hour, token_address, price
    from crosschain.core.fact_hourly_prices p
    join crosschain.core.dim_contracts c
    on c.address = p.token_address
    and p.blockchain = c.blockchain
    ),
    transactions as (
    select tx_hash, to_address, from_address
    from arbitrum.core.fact_transactions
    where status = 'SUCCESS'
    union all
    select tx_hash, to_address, from_address
    from avalanche.core.fact_transactions
    where status = 'SUCCESS'
    union all
    select tx_hash, to_address, from_address
    from bsc.core.fact_transactions
    where status = 'SUCCESS'
    union all
    select tx_hash, to_address, from_address
    from ethereum.core.fact_transactions
    where status = 'SUCCESS'
    union all
    select tx_hash, to_address, from_address
    from optimism.core.fact_transactions
    where status = 'SUCCESS'
    union all
    select tx_hash, to_address, from_address
    from polygon.core.fact_transactions
    where status = 'SUCCESS'
    ),
    bridges as (
    select address, project_name, 'Bridge' as type
    from crosschain.core.address_labels
    where label_type ilike 'bridge'
    Run a query to Download Data