MLDZMNmgf16
    Updated 2023-03-14
    with t1 as (select
    RECORDED_HOUR::date as day,
    avg(close) as price_token
    from solana.core.fact_token_prices_hourly where SYMBOL='SOL'
    group by 1),
    t2 as (
    select
    block_timestamp,
    tx_id,
    tx_to as users,
    amount,
    amount*1 as USD_Volume
    from solana.core.fact_transfers
    where mint = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
    and block_timestamp >= '2022-02-08'
    and tx_from = '3uxNepDbmkDNq6JhRja5Z8QwbTrfmkKP8AKZV5chYDGG'
    union all
    select
    block_timestamp,
    tx_id,
    signers[0] as users,
    inner_instruction:instructions[0]:parsed:info:amount/1e9 as amount,
    amount*price_token as USD_Volume
    from solana.core.fact_events a left join t1 b on a.block_timestamp::date=b.day
    where program_id = 'MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA'
    and block_timestamp >= '2022-02-08'
    and inner_instruction:instructions[0]:parsed:info:authority = 'DD3AeAssFvjqTvRTrRAtpfjkBF8FpVKnFuwnMLN9haXD'

    )

    select
    t.block_timestamp::date as date,
    l.LABEL as programs,
    Run a query to Download Data