Salehapt_tx_date
    Updated 2024-05-26
    with lst_price as (
    select
    hour::date as price_date
    ,avg(price) as APT_price
    from aptos.price.ez_hourly_token_prices
    where symbol='APT'
    group by 1
    order by 1
    )
    select
    date_trunc(week,block_timestamp)::date as date
    ,count(DISTINCT block_timestamp::date) as "Activity Days"
    ,count( DISTINCT tx_hash ) as "TXs"
    ,"TXs" / "Activity Days" as "Transactions/day Average"
    ,"TXs"/"Activity Days"/24/60/60 as "Avg. Transactions/sec"
    ,count(DISTINCT sender) as Wallets
    ,sum(gas_unit_price*gas_used/1e8) as "Total Gas Received"
    ,count(iff(SUCCESS!=true,'F',null)) as "Failed Transactions"
    ,count(iff(SUCCESS,'T',null)) as "Success Transactions "
    from aptos.core.fact_transactions
    group by 1
    order by 1


    QueryRunArchived: QueryRun has been archived