MLDZMNLP5
Updated 2022-08-24
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
›
⌄
with tb1 as (SELECT *
from ethereum.core.dim_dex_liquidity_pools
where PLATFORM='sushiswap'),
tb2 as (SELECT
count(distinct ORIGIN_FROM_ADDRESS) as total_LP_providers
from ethereum.core.ez_token_transfers
where TO_ADDRESS in (select POOL_ADDRESS from tb1)
and ORIGIN_TO_ADDRESS='0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f'
and origin_function_signature in ('0xe8e33700', '0xded9382a', '0xf305d719')
)
select
case
when label is not null then 'owned by the Protocol'
when label is null then 'Retail LP'
end as gp,
sum(AMOUNT_USD) as TVL
from ethereum.core.ez_token_transfers x left outer join ethereum.core.dim_labels y on x.ORIGIN_FROM_ADDRESS=y.ADDRESS
where ORIGIN_TO_ADDRESS='0xef0881ec094552b2e128cf945ef17a6752b4ec5d' and ORIGIN_FUNCTION_SIGNATURE='0x8dbdbe6d'
group by 1
Run a query to Download Data