gokcinsol transacvtion top 5
Updated 2022-09-30Copy 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
›
⌄
with tx as ( select date(BLOCK_TIMESTAMP) as date, tx_hash, from_address ,to_address, substring(INPUT_DATA, 202, 1) as chain_id,ORIGIN_FUNCTION_SIGNATURE
from ethereum.core.fact_transactions
where block_timestamp::date >= '2022-01-01' and status = 'SUCCESS')
,
sol_eth as ( select tx_hash
from tx
where to_address = lower('0x3ee18b2214aff97000d974cf647e7c347e8fa585') and origin_function_signature = '0xc6878519' and chain_id = '1'
),
eth_sol as ( select tx_hash
from tx
where to_address = lower('0x3ee18b2214aff97000d974cf647e7c347e8fa585') and origin_function_signature in ( '0x0f5287b0','0x9981509f') and chain_id = '1'
)
,
tb1 as ( select 'Solana -> Ethereum' as type, symbol, count(DISTINCT(tx_hash)) as tx , sum(amount_usd) as volume
from ethereum.core.ez_token_transfers
where tx_hash in ( select tx_hash from sol_eth )
group by 1,2)
,
tb2 as ( select 'Ethereum -> Solana' as type, symbol , count(DISTINCT(tx_hash)) as tx , sum(amount_usd) as volume
from ethereum.core.ez_token_transfers
where tx_hash in ( select tx_hash from eth_sol )
group by 1,2)
select type, symbol , tx
from tb1
where volume is not null
order by 3 desc
limit 5
Run a query to Download Data