mucryptoTop gainers/losers by 1 day change in TVL (%) 2024-06-26 02:23 PM
    Updated 2024-06-26
    with resps as
    (select defillama.get('/protocols', {}) as resp),

    positive as (
    select
    value:category as category,
    value:name as name,
    cast(value:change_1d as decimal(38,2)) as "ONE DAY CHANGE",
    value:url::string as url,
    value:description::string as description
    from resps,
    lateral flatten (input => resp:data)
    where category = 'Algo-Stables'
    and "ONE DAY CHANGE" > 0
    order by 3 desc
    limit 10),

    negative as (
    select
    value:category as category,
    value:name as name,
    cast(value:change_1d as decimal(38,2)) as "ONE DAY CHANGE",
    value:url::string as url,
    value:description as description
    from resps,
    lateral flatten (input => resp:data)
    where category = 'Algo-Stables'
    and "ONE DAY CHANGE" < 0
    order by 3
    limit 10)

    select
    name,
    concat("ONE DAY CHANGE", '%') as "ONE DAY CHANGE",
    url,
    description,
    QueryRunArchived: QueryRun has been archived