superflyUntitled Query
Updated 2022-08-18Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
›
⌄
select
count(distinct tx_hash) as number_of_transactions,
count(distinct ORIGIN_FROM_ADDRESS) as number_of_users,
sum( TOKEN0_AMOUNT_USD ) as total_volume,
'deposit' as Activity
from optimism.velodrome.ez_lp_actions
where LP_TOKEN_ACTION = 'mint' and BLOCK_TIMESTAMP between CURRENT_DATE - {{days_back}} and CURRENT_DATE-1
union all
select
count(distinct tx_hash) as number_of_transactions,
count(distinct ORIGIN_FROM_ADDRESS) as number_of_users,
sum( TOKEN0_AMOUNT_USD ) as total_volume,
'withdraw' as Activity
from optimism.velodrome.ez_lp_actions
where
LP_TOKEN_ACTION = 'burn' AND BLOCK_TIMESTAMP between CURRENT_DATE - {{days_back}} and CURRENT_DATE-1
Run a query to Download Data