rajsFlow Transactions Total
    Updated 2022-07-18
    SELECT
    -- date_trunc('day', block_timestamp) as date,
    count(*) / (1440 * count(distinct date_trunc('day', block_timestamp))) as avg_tpm,
    count(*) as no_of_txs,
    count(case when tx_succeeded = 'TRUE' then 1 end) as no_of_successful_txs,
    count(case when tx_succeeded = 'TRUE' then 1 end) / count(*) * 100 as successful_txs_pct,
    count(case when tx_succeeded <> 'TRUE' then 1 end) as no_of_failed_txs,
    count(case when tx_succeeded <> 'TRUE' then 1 end) / count(*) * 100 as failed_txs_pct
    from flow.core.fact_transactions
    where block_timestamp >= CURRENT_DATE - interval '30 days'
    and block_timestamp < '2022-07-11'
    -- group by 1
    -- order by 1 desc
    Run a query to Download Data