nitsPolygon vs Optimism vs Hop
Updated 2022-06-19
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_op as
(SELECT date(block_timestamp) as day, sum(amount_usd) as total_amt, sum(total_amt) over (order by day) as cumulative_amt_usd
from ethereum.core.ez_eth_transfers
where origin_to_address ilike '0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1' and origin_function_signature = '0xb1a1a882' and block_timestamp >= CURRENT_DATE - 180
GROUP by 1 ),
erc20_op as
(SELECT date(block_timestamp) as day, sum(amount_usd) as total_amt, sum(total_amt) over (order by day) as cumulative_amt_usd
from ethereum.core.ez_token_transfers
where origin_to_address ilike '0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1' and origin_function_signature = '0x58a997f6' and block_timestamp >= CURRENT_DATE - 180
GROUP by 1 ),
op as
(SELECT day, sum(total_amt) as total_amt_usd, sum(cumulative_amt_usd) as cumulative_amount_usd , 'optimism' as chain
from
(SELECT * from erc20_op
UNION ALL
SELECT * FROM eth_op)
GROUP by 1 ),
eth_po as
(SELECT date(block_timestamp) as day, sum(amount_usd) as total_amt, sum(total_amt) over (order by day) as cumulative_amt_usd
from ethereum.core.ez_eth_transfers
where origin_to_address = '0xa0c68c638235ee32657e8f720a23cec1bfc77c77' and eth_to_address = '0xa0c68c638235ee32657e8f720a23cec1bfc77c77'
and block_timestamp >= CURRENT_DATE - 180
GROUP by 1 ),
erc20_po as
(SELECT date(block_timestamp) as day, sum(amount_usd) as total_amt, sum(total_amt) over (order by day) as cumulative_amt_usd
from ethereum.core.ez_token_transfers
where origin_to_address = '0xa0c68c638235ee32657e8f720a23cec1bfc77c77'
and block_timestamp >= CURRENT_DATE - 180
GROUP by 1 ),
po as
(SELECT day, sum(total_amt) as total_amt_usd, sum(cumulative_amt_usd) as cumulative_amount_usd , 'polygon' as chain
from
(SELECT * from erc20_po
UNION ALL
SELECT * FROM eth_po)
GROUP by 1 ),
Run a query to Download Data