dan-smithComptroller testing1
Updated 2023-02-08
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
›
⌄
WITH tokens_in AS(
SELECT
*
,SUM(amount) OVER(PARTITION BY SYMBOL) AS symbol_total
FROM (
SELECT
SYMBOL
,FROM_ADDRESS
,SUM(AMOUNT) AS amount
FROM ethereum.core.ez_token_transfers
WHERE
TO_ADDRESS = lower('0xB1748C79709f4Ba2Dd82834B8c82D4a505003f27')
AND SYMBOL IN('CRV', 'CVX', 'FXS')
GROUP BY 1,2
)
),
tokens_out AS (
SELECT
SYMBOL
,TO_ADDRESS
,SUM(AMOUNT) AS amount
FROM ethereum.core.ez_token_transfers
WHERE
FROM_ADDRESS = lower('0xB1748C79709f4Ba2Dd82834B8c82D4a505003f27')
AND SYMBOL IN('CRV', 'CVX', 'FXS')
GROUP BY 1,2
)
SELECT *
FROM tokens_out
Run a query to Download Data