hessTop Platforms
    Updated 2024-10-01
    with tops as ( select protocol,
    CHAIN_TVL
    from external.defillama.fact_protocol_tvl
    where chain ilike '%Klaytn%'
    order by 2 desc
    )

    select date,
    case when protocol ilike '%neopin%' then 'Neopin'
    when protocol ilike '%klayswap%' then 'Klayswap'
    when protocol ilike '%swapscanner%' then 'Swapscanner' else protocol end as platform,
    sum(chain_tvl) as tvl
    from external.defillama.fact_protocol_tvl
    where date = current_date - 1
    and protocol in (select protocol from tops)
    group by 1,2

    QueryRunArchived: QueryRun has been archived