rajsTerra Megadashboard
    Updated 2023-01-04
    with txs as
    (
    SELECT
    date_trunc('hour', block_timestamp) as date,
    avg(fee) as avg_tx_fee,
    sum(fee) as total_tx_fee,
    count(*) as no_of_txs,
    count(*)/(60*60) as tps,
    count(distinct tx_sender) as no_of_active_users,
    count(case when tx_succeeded = 'TRUE' then 1 end) / count(*) * 100 as pct_successful_txs
    from terra.core.fact_transactions
    group by 1
    )
    ,

    blocks as
    (

    )
    SELECT
    *
    from txs
    Run a query to Download Data