0xaimanUntitled Query
Updated 2022-08-01
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
›
⌄
with addliquid as (
select
TO_ADDRESS_NAME as pool_name,
sum(amount_usd) as addliquidity_amount
from polygon.udm_events
where ORIGIN_FUNCTION_NAME ilike '%addLiquidity%'
and amount_usd is not NULL
and to_label='quickswap'
and TO_ADDRESS_NAME !='quickswap router'
GROUP by 1
),
removeliq as (
select
TO_ADDRESS_NAME as pool_name,
sum(amount_usd) as removeliquidity_amount
from polygon.udm_events
where ORIGIN_FUNCTION_NAME ilike '%removeLiquidity%'
and amount_usd is not NULL
and to_label='quickswap'
and TO_ADDRESS_NAME !='quickswap router'
GROUP by 1
)
select
a.pool_name as pool_name,
round( a.addliquidity_amount,0) as Totla_Value_Locked
from addliquid a
left join removeliq b
on a.pool_name = b.pool_name
order by 2 DESC
limit 10
Run a query to Download Data