boomer77Untitled Query
    Updated 2022-03-22
    with contract as (select msg_value:contract::string as dapps, count(distinct tx_id) as counts
    from terra.msgs
    where tx_status = 'FAILED' and date(block_timestamp) >= CURRENT_DATE - 90
    group by 1
    order by 2 desc
    limit 20),

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

    select a.dapps, b.address_name, a.counts
    from contract a
    left join label b on a.dapps = b.address
    Run a query to Download Data