Updated 2024-11-30
    with

    blocto_txns as (
    select
    tx_id,
    block_timestamp,
    f.value as user,
    event_data:amount as tx_fee
    from flow.core.fact_transactions
    inner join table(flatten (input => authorizers)) f
    join flow.core.fact_events
    using (tx_id)
    where payer = '0x55ad22f01ef568a1'
    and event_contract = 'A.f919ee77447b7497.FlowFees'
    and tx_succeeded = 1
    and user not in (select distinct account_address from flow.core.dim_contract_labels)
    )

    select
    count(distinct tx_id) as transactions,
    count(distinct user) as users,
    sum(tx_fee) as fees_volume_flow,
    avg(tx_fee) as average_fees_amount_flow,
    transactions / count(distinct block_timestamp::date) as daily_average_transactions,
    users / count(distinct block_timestamp::date) as daily_average_users
    from blocto_txns
    QueryRunArchived: QueryRun has been archived