banbannardMerge Sushiswap LP 9
Updated 2022-10-03Copy Reference Fork
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
›
⌄
with base as (select
date_trunc('day', block_timestamp) as day,
origin_from_address,
sum(amount_usd) as USD_Volume
from ethereum.core.ez_eth_transfers
where day > '2022-09-02'
-- from pools
and eth_from_address in (select contract_address
from ethereum.sushi.ez_swaps)
-- not swaps
and tx_hash not in (select tx_hash
from ethereum.sushi.ez_swaps
where block_timestamp > '2022-09-02')
group by 1,2
union
select
date_trunc('day', block_timestamp) as day,
origin_from_address,
sum(amount_usd) as USD_Volume
from ethereum.core.ez_token_transfers
where day > '2022-09-02'
-- from pools
and from_address in (select contract_address
from ethereum.sushi.ez_swaps)
-- not swaps
and tx_hash not in (select tx_hash
from ethereum.sushi.ez_swaps
where block_timestamp > '2022-09-02')
group by 1,2)
select origin_from_address,
Run a query to Download Data