mucryptoTop 10 liquid staking protocols by 1 day change 2023-08-29 05:58 AM
    Updated 2023-08-29
    with resps as
    (select defillama.get('/protocols', {}) as resp),

    positive as (
    select
    value:category::string as category,
    value:name::string as name,
    value:change_7d as seven_day_change,
    value:tvl::number as tvl
    from resps,
    lateral flatten (input => resp:data)
    where category = 'Liquid Staking'
    and tvl != 0
    and seven_day_change > 0),

    negative as (
    select
    value:category::string as category,
    value:name::string as name,
    value:change_7d as seven_day_change,
    value:tvl::number as tvl
    from resps,
    lateral flatten (input => resp:data)
    where category = 'Liquid Staking'
    and tvl != 0
    and seven_day_change < 0),

    positive_adj as (
    select
    name,
    seven_day_change,
    cast(seven_day_change as decimal(38,2)) as seven_day_change_adj,
    'Positive' as category
    from positive
    where seven_day_change_adj is not null
    order by 3 desc
    Run a query to Download Data