misaghlbFLOW Speed (redux)
    Updated 2022-12-13
    with raw as (
    select
    date_trunc('day', block_timestamp) as mdate,
    count(case when STATUS = 'SUCCESS' then TRUE else NULL end ) as success,
    count(DISTINCT TX_HASH) as tx_count,
    count(DISTINCT FROM_ADDRESS) as users,
    tx_count/1440 as tpm,
    tx_count/86400 as tps,
    tx_count - success as fails,
    success / (tx_count) as success_rate,
    1 - success_rate as failure_rate
    from gnosis.core.fact_transactions
    where date(block_timestamp) >= '2022-01-01'
    group by mdate
    ),
    raw3 as (
    select
    date_trunc('day', block_timestamp) as mdate,
    count(case when STATUS = 'SUCCESS' then TRUE else NULL end ) as success,
    count(DISTINCT TX_HASH) as tx_count,
    count(DISTINCT FROM_ADDRESS) as users,
    tx_count/1440 as tpm,
    tx_count/86400 as tps,
    tx_count - success as fails,
    success / (tx_count) as success_rate,
    1 - success_rate as failure_rate
    from ethereum.core.fact_transactions
    where date(block_timestamp) >= '2022-01-01'
    group by mdate
    ),
    raw4 as (
    select
    date_trunc('day', block_timestamp) as mdate,
    count(case when TX_SUCCEEDED = 'TRUE' then TRUE else NULL end ) as success,
    count(DISTINCT TX_ID) as tx_count,
    count(DISTINCT PROPOSER) as users,
    Run a query to Download Data