mattkstewVelodrome Health 7
Updated 2022-11-15
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 tab1 as (
select
pool_name,
sum(Case
when lp_action like 'deposit' then token0_amount_usd
else token0_amount_usd * -1
end)
from optimism.velodrome.ez_lp_actions
where token0_amount_usd is not null
group by 1
order by 2 DESC
limit 10 )
select
date_trunc('day', block_timestamp),
pool_name,
sum(Case
when lp_action like 'deposit' then token0_amount_usd
else token0_amount_usd * -1
end)
from optimism.velodrome.ez_lp_actions
where token0_amount_usd is not null
and pool_name in (select pool_name from tab1)
group by 1, 2
Run a query to Download Data