eferfanQ2 (ETH flow)
Updated 2022-07-26Copy 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 tx1 as (
SELECT tx_hash , from_address as wallet
from ethereum.core.ez_token_transfers
where to_ADDRESS = '0x0000000000000000000000000000000000000000'
and symbol = 'SLP'
) ,
tx2 as (
SELECT A.tx_hash
from ethereum.core.ez_token_transfers A , tx1 B
where symbol = 'USDC'
and from_address= wallet
and A.tx_hash = B.tx_hash
) ,
tx3 as (
SELECT A.tx_hash ,block_timestamp::date as daily , max(amount) as volume
from ethereum.core.ez_token_transfers A , tx2 B , tx1 C
where A.tx_hash = B.tx_hash
and C.tx_hash = B.TX_hash
and symbol = 'WETH'
and from_address = wallet
GROUP by 1 , 2
) ,
tx4 as (
SELECT daily, sum(volume) as remove
from tx3 D
GROUP by 1
)
, tx5 as (
SELECT tx_hash , to_address as wallet
from ethereum.core.ez_token_transfers
where FROM_ADDRESS = '0x0000000000000000000000000000000000000000'
and symbol = 'SLP'
Run a query to Download Data