amelia-leeUntitled Query
Updated 2022-08-11
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
32
33
34
›
⌄
with tb1 as (select
BLOCK_TIMESTAMP,
FROM_ADDRESS as wallets
from ethereum.core.fact_transactions
where substring(INPUT_DATA, 202, 1)='1'
and ORIGIN_FUNCTION_SIGNATURE in ('0x9981509f','0x0f5287b0') -- Ethereum to Solana
and TO_ADDRESS='0x3ee18b2214aff97000d974cf647e7c347e8fa585'
and STATUS='SUCCESS'
and BLOCK_TIMESTAMP>=CURRENT_DATE-90
),
tb2 as (
select
x.block_timestamp,
x.tx_hash,
from_address as users
from ethereum.core.fact_transactions x
join tb1 y on x.from_address = y.wallets and x.block_timestamp<y.block_timestamp --before bridge
order by 1
)
select
distinct event_name as first_actions,
count(distinct tx_hash) as counts,
count(distinct origin_from_address) as users
from ethereum.core.fact_event_logs
where tx_hash in (select tx_hash from tb2)
group by 1
having first_actions is not null
order by 2 desc limit 10
--MLD_ZMN
--second
Run a query to Download Data