Afonso_Diaz2023-06-19 01:51 AM
    Updated 2023-06-18
    select
    label_type,
    count(distinct tx_hash) as transactions,
    count(distinct origin_from_address) as users,
    sum(event_inputs:value/1e6) as volume_usd,
    avg(event_inputs:value/1e6) as average_volume_usd,
    median(event_inputs:value/1e6) as median_volume_usd
    from optimism.core.fact_event_logs a
    join optimism.core.dim_labels b
    on a.origin_to_address = b.address
    where tx_status = 'SUCCESS'
    and event_name = 'Transfer'
    and label_type != 'token'
    and label_subtype != 'token_contract'
    and contract_address in ('0x7f5c764cbc14f9669b88837ca1490cca17c31607')
    and block_timestamp::date >= current_date - 90
    and tx_status = 'SUCCESS'
    group by 1
    order by 2 desc
    Run a query to Download Data