MLDZMNvelod3
Updated 2022-11-17Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
›
⌄
SELECT
date_trunc('week',block_timestamp) as date,
'Deposit' as actions,
count(DISTINCT tx_hash) as no_actions,
count(distinct ORIGIN_FROM_ADDRESS) as wallets,
sum(TOKEN0_AMOUNT_USD+TOKEN1_AMOUNT_USD) as volume
FROM optimism.velodrome.ez_lp_actions where LP_ACTION='deposit'
GROUP BY 1,2
union all
SELECT
date_trunc('week',block_timestamp) as date,
'Withdraw' as actions,
-count(DISTINCT tx_hash) as no_actions,
-count(distinct ORIGIN_FROM_ADDRESS) as wallets,
-sum(TOKEN0_AMOUNT_USD+TOKEN1_AMOUNT_USD) as volume
FROM optimism.velodrome.ez_lp_actions where LP_ACTION='withdraw'
GROUP BY 1,2
Run a query to Download Data