Moesqsq tot 2
Updated 2023-02-15
999
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
›
⌄
select
sum(USD_AMOUNT ) as USD_AMOUNT,
avg(avg_USD_AMOUNT ) as avg_USD_AMOUNT,
sum(senders ) as senders,
sum(txns ) as txns
from (
(SELECT
'Ethereum' as source,
sum(AMOUNT_USD) as USD_AMOUNT,
avg(AMOUNT_USD) as avg_USD_AMOUNT,
count (distinct DECODED_LOG:refundAddress) as senders,
count(distinct l.TX_HASH) as txns
FROM ethereum.core.fact_decoded_event_logs l
inner join ethereum.core.ez_token_transfers t on t.tx_hash = l.tx_hash
WHERE l.tx_hash in (
SELECT tx_hash
FROM ethereum.core.fact_token_transfers
WHERE to_address ILIKE ('0xce16f69375520ab01377ce7b88f5ba8c48f8d666')
)
and DECODED_LOG:destinationChain is not null
)
union all
(with base as (SELECT
'Polygon' as source
,*,
try_hex_decode_string(substr(data, 3 + (64*7), 16)) as destination,
concat (source,'->',destination) as direction
FROM polygon.core.fact_event_logs
Run a query to Download Data