Moe0 Aling
    Updated 2022-11-19
    with base as
    (select address from
    ethereum.core.dim_labels
    where LABEL ilike 'ftx'
    or label ilike 'alameda research')

    , outfl as (
    select
    BLOCK_TIMESTAMP::date as date ,
    --'ETH' as symbol,
    AMOUNT_USD,
    ORIGIN_TO_ADDRESS,
    TX_HASH
    from
    ethereum.core.ez_eth_transfers
    where ORIGIN_FROM_ADDRESS in (select address from base )
    union all --******************************************************************
    select
    BLOCK_TIMESTAMP::date as date ,
    --symbol,
    AMOUNT_USD,
    ORIGIN_TO_ADDRESS,
    TX_HASH
    from
    ethereum.core.ez_token_transfers
    where ORIGIN_FROM_ADDRESS in (select address from base )
    )
    select
    --BLOCK_TIMESTAMP::date as date ,
    label,address_name ,
    count(tx_hash) as txs
    from
    ethereum.core.fact_transactions t , ethereum.core.dim_labels l
    where
    Run a query to Download Data