freemartianUntitled Query
Updated 2022-09-13
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
›
⌄
select
sum(amount_usd)/count(distinct tx_hash) as Average,
symbol,
date_trunc('Day', block_timestamp) as TIME,
case
when origin_to_address = '0xa0c68c638235ee32657e8f720a23cec1bfc77c77' then 'Polygon'
when origin_to_address = '0x72ce9c846789fdb6fc1f34ac4ad25dd9ef7031ef' then 'Arbitrum'
when origin_to_address = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1' then 'Optimism'
when origin_to_address = lower('0x3666f603Cc164936C1b87e207F36BEBa4AC5f18a') then 'Hop'
when origin_to_address = lower('0x3E4a3a4796d16c0Cd582C382691998f7c06420B6') then 'Hop'
when origin_to_address = lower('0x3d4Cc8A61c7528Fd86C55cfe061a78dCBA48EDd1') then 'Hop'
when origin_to_address = lower('0xb98454270065A31D71Bf635F6F7Ee6A518dFb849') then 'Hop'
when origin_to_address = lower('0x22B1Cbb8D98a01a3B71D034BB899775A76Eb1cc2') then 'Hop'
end as Native_Bridge
from ethereum.core.ez_token_transfers
where origin_to_address in (
'0xa0c68c638235ee32657e8f720a23cec1bfc77c77',
'0x72ce9c846789fdb6fc1f34ac4ad25dd9ef7031ef',
'0x99c9fc46f92e8a1c0dec1b1747d010903e884be1',
lower('0x3666f603Cc164936C1b87e207F36BEBa4AC5f18a'),
lower('0x3E4a3a4796d16c0Cd582C382691998f7c06420B6'),
lower('0x3d4Cc8A61c7528Fd86C55cfe061a78dCBA48EDd1'),
lower('0xb98454270065A31D71Bf635F6F7Ee6A518dFb849'),
lower('0x22B1Cbb8D98a01a3B71D034BB899775A76Eb1cc2'))
and block_timestamp > CURRENT_DATE - 60
and symbol in ('DAI')
and block_timestamp > '2022-01-01'
group by symbol, TIME, Native_Bridge
Run a query to Download Data