boomer77most failed contract
    Updated 2022-03-29
    with contract as (select date_trunc('day', block_timestamp) as dt, msg_value:contract::string as dapps, count(distinct tx_id) as counts
    from terra.msgs
    where tx_status = 'FAILED' and date(block_timestamp) = '2022-03-07'
    group by 1,2),

    label as (select address, address_name
    from terra.labels)

    select a.dt, a.dapps, b.address_name, a.counts
    from contract a
    left join label b on a.dapps = b.address
    order by 4 desc
    limit 10
    Run a query to Download Data