rajsNative Bridge Optimism Total Deposits
Updated 2022-06-17Copy 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
›
⌄
SELECT
sum(usd_amount) as total_usd_amount,
sum(no_of_txs) as total_no_of_txs,
sum(usd_amount) / sum(no_of_txs) as avg_tx_size
FROM
(
SELECT
date_trunc('day', block_timestamp) as date,
'WETH' as symbol,
sum(amount) as raw_amount,
sum(amount_usd) as usd_amount,
count(*) as no_of_txs
from ethereum.core.ez_token_transfers
where origin_to_address = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1'
and block_timestamp >= CURRENT_DATE - interval '60 days'
group by 1,2
UNION
SELECT
date_trunc('day', block_timestamp) as date,
coalesce(symbol,contract_address) as symbol,
sum(amount) as raw_amount,
sum(amount_usd) as usd_amount,
count(*) as no_of_txs
from ethereum.core.ez_token_transfers
where origin_to_address = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1'
and block_timestamp >= CURRENT_DATE - interval '60 days'
group by 1,2
)
Run a query to Download Data