mucryptoNumber of protocols per TVL category (USD) 2024-02-06 05:07 PM
    Updated 2024-02-06
    with resps as
    (select defillama.get('/protocols', {}) as resp),

    list as (
    select
    value:category as category,
    value:parentProtocol as protocol,
    value:name as name,
    value:tvl as tvl
    from resps,
    lateral flatten (input => resp:data)
    where category = 'RWA'),

    m_protocols as (
    select
    substr(protocol, 8) as protocol,
    sum(tvl) as tvl
    from list
    group by 1),

    protocols as (
    select
    name,
    sum(tvl) as tvl
    from list
    where protocol is null
    group by 1),

    final_list as (
    select
    protocol,
    tvl
    from m_protocols
    where protocol is not null

    union all
    Last run: about 1 year ago
    TVL category
    Number of protocols
    1
    1m - 5m9
    2
    10m - 50m7
    3
    100k - 1m6
    4
    1k - 100k4
    5
    Above 100m4
    6
    5m - 10m2
    7
    50m - 100m2
    8
    02
    9
    101 - 1k1
    10
    0-1001
    10
    147B
    9s