Sbhn_NPtotal bridge stuff
Updated 2022-10-31
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
›
⌄
--inspired : alik110
with ETHTable as (
select block_timestamp,
tx_hash,
eth_from_address as origin_from_address,
amount_usd
from ethereum.core.ez_eth_transfers
where eth_to_address = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1'
and eth_from_address not in ('0xa7f7e4fe8e4cddcd9969bd3fbcff67000cd7de47','0x14ac5b3580dd1e546cd7287cd1fadba9a8736628')),
TokenTable as (
select block_timestamp,
tx_hash,
origin_from_address,
amount_usd
from ethereum.core.ez_token_transfers
where to_address = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1'
and origin_from_address not in ('0xa7f7e4fe8e4cddcd9969bd3fbcff67000cd7de47','0x14ac5b3580dd1e546cd7287cd1fadba9a8736628')),
maintable as (select * from ethtable union all select * from tokentable)
select
count (distinct tx_hash) as Bridges_Count,
count (distinct origin_from_address) as Bridgers_Count,
sum (amount_usd) as Total_Bridge_Volume_USD,
avg (amount_usd) as Average_Bridge_Volume_USD
from maintable
Run a query to Download Data