zakkisyed2. Curve: weekly fee total
Updated 2022-01-09
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
31
32
33
34
35
36
›
⌄
⌄
⌄
select
--distinct e2.pool_name, sum(e1.fee_usd), date_trunc('week', e2.block_timestamp) as week
date_trunc('week', block_timestamp) as week, sum(fee_usd) as total_fee
from ethereum.transactions
/*as e1
INNER JOIN ethereum.dex_swaps as e2
ON e1.tx_id = e2.tx_id
*/
where to_label = 'curve fi'
or from_label = 'curve fi'
and block_timestamp >= CURRENT_DATE - 365
group by 1
order by 1 desc
/* select e1.tx_id, e2.tx_fee
--sum(e2.fee_usd), e1.pool_name, date_trunc('week', e1.block_timestamp) as week
from ethereum.dex_swaps as e1
INNER JOIN ethereum.transactions as e2
ON e1.tx_id = e2.tx_id
where e1.platform = 'curve'
and e1.block_timestamp = current_date - 60
Run a query to Download Data