trader_wawa2023-08-16 04:06 AM
Updated 2023-08-16
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 ETH_TRANSFERS AS (
SELECT
BLOCK_TIMESTAMP,
CASE
WHEN FROM_ADDRESS = '0x9f28b1eacf17f64cd952deaa14f0487b9f74bbb6'
THEN -AMOUNT
ELSE AMOUNT
END AS ETH_FLOW,
'ETH' AS TOKEN
FROM arbitrum.core.ez_token_transfers
WHERE (FROM_ADDRESS = '0x9f28b1eacf17f64cd952deaa14f0487b9f74bbb6' OR TO_ADDRESS = '0x9f28b1eacf17f64cd952deaa14f0487b9f74bbb6')
AND CONTRACT_ADDRESS = '0x82af49447d8a07e3bd95bd0d56f35241523fbab1'
),
SAVVY_TRANSFERS AS (
SELECT
BLOCK_TIMESTAMP,
CASE
WHEN FROM_ADDRESS = '0x9f28b1eacf17f64cd952deaa14f0487b9f74bbb6'
THEN -AMOUNT
ELSE AMOUNT
END AS SAVVY_FLOW,
'SAVVY' AS TOKEN
FROM arbitrum.core.ez_token_transfers
WHERE (FROM_ADDRESS = '0x9f28b1eacf17f64cd952deaa14f0487b9f74bbb6' OR TO_ADDRESS = '0x9f28b1eacf17f64cd952deaa14f0487b9f74bbb6')
AND CONTRACT_ADDRESS = '0x43ab8f7d2a8dd4102ccea6b438f6d747b1b9f034'
),
COMBINE AS (
SELECT
CASE
WHEN E.BLOCK_TIMESTAMP IS NOT NULL
THEN E.BLOCK_TIMESTAMP
ELSE S.BLOCK_TIMESTAMP
END AS BLOCK_TIMESTAMP,
CASE
Run a query to Download Data