sarathimpermanentloss2
Updated 2022-09-29
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 tx5 as (
SELECT tx_hash , to_address as wallet
from ethereum.core.ez_token_transfers
where FROM_ADDRESS = '0x0000000000000000000000000000000000000000'
and symbol = 'SLP'
and block_number between 14000000 and 15180000
) ,
tx6 as (
SELECT A.tx_hash
from ethereum.core.ez_token_transfers A , tx5 B
where symbol = 'USDC'
and from_address= wallet
and A.tx_hash = B.tx_hash
) ,
tx7 as (
SELECT A.tx_hash , block_number , max(amount) as volume
from ethereum.core.ez_token_transfers A , tx6 B , tx5 C
where A.tx_hash = B.tx_hash
and C.tx_hash = B.TX_hash
and (symbol = 'WETH' )
and to_address = '0x397ff1542f962076d0bfe58ea045ffa2d347aca0'
GROUP by 1 , 2
),
tx8 as (
SELECT A.tx_hash , block_number , max(amount) as volume_usdc
from ethereum.core.ez_token_transfers A , tx6 B , tx5 C
where A.tx_hash = B.tx_hash
and C.tx_hash = B.TX_hash
and symbol = 'USDC'
and from_address = wallet
and to_address = '0x397ff1542f962076d0bfe58ea045ffa2d347aca0'
GROUP by 1 , 2
Run a query to Download Data