strawbettyFailure causes
    Updated 2022-03-27
    with terra_txns as (
    SELECT
    COUNT(tx_id) as totals,
    ltrim(regexp_substr(tx_status_msg, '.*:([\\w\\s,\\(\\\\;)]+)$', 1, 1, 'e', 1)) as fail_reason,
    date_trunc('day', block_timestamp) as ddate
    from terra.transactions
    WHERE
    block_timestamp>='2022-01-01'
    AND tx_status!='SUCCEEDED'
    GROUP BY ddate,fail_reason ORDER BY ddate ASC
    )

    SELECT
    ddate,
    totals,
    CASE WHEN fail_reason = 'reveal period of submitted vote do not match with registered prevote'
    THEN 'vote didnt match prevote' ELSE fail_reason END as fail_reason,
    row_number() OVER (PARTITION BY DDATE ORDER BY totals DESC) as rno
    from terra_txns
    QUALIFY rno<=5
    Run a query to Download Data