mariyaBots and success rate
    Updated 2022-04-27
    WITH TOP10UST as (
    select db.address,
    l.address_name as address_name ,
    l.label_type as label_type ,
    sum(db.balance) as balance
    from terra.daily_balances db
    left join terra.labels l
    on db.address = l.address
    where date = (select max(date ) from terra.daily_balances )
    and currency in ('UST')
    and balance > 0
    group by 1,2,3
    order by balance desc
    LIMIT 10
    )
    select case when address_name is not null then concat(address_name,'(type: ',label_type, ')')
    else address
    end as name ,
    case when label_type is not null then label_type
    else NULL
    end as type ,
    balance
    from TOP10UST order by balance desc