CartanGroup2024-04-10 09:04 PM
    Updated 2024-04-11
    select
    date(c.block_timestamp) as date,
    LABEL_TYPE as Type,
    case when LABEL='Move Dollar' then 'Thala' else LABEL end as LABEL,
    --LABEL_SUBTYPE,
    count(distinct c.tx_hash) as txs,
    count(distinct sender) as users,
    sum((gas_used * gas_unit_price)/1e8) as fee
    from aptos.core.fact_events a
    join aptos.core.dim_labels b on address = event_address
    join aptos.core.fact_transactions c on a.tx_hash = c.tx_hash
    where c.SUCCESS=true
    and c.tx_type = 'user_transaction'
    and c.block_timestamp::date >= '2023-01-01'
    and LABEL_TYPE != 'token'
    group by 1,2,3
    order by 1 asc
    QueryRunArchived: QueryRun has been archived