Updated 2022-06-03
    with t1 as (SELECT
    date_trunc('minute',s.BLOCK_TIMESTAMP) as dt,
    s.TX_SUCCEEDED,
    b.EVENT_TYPE,
    count(s.TX_ID) as no_txn
    from flow.core.fact_transactions s left outer join flow.core.fact_events b on s.tx_id=b.tx_id
    where s.BLOCK_TIMESTAMP>='2022-05-09'
    group by 1,2,3)

    select
    date_trunc('day',dt) as date,
    TX_SUCCEEDED,
    event_type,
    max(no_txn) as max_tpm

    from t1 group by 1,2,3

    Run a query to Download Data