0xaiman2023-05-22 10:15 AM
Updated 2023-05-22
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
›
⌄
--deposit
with
a as (
select
tx_hash
from
avalanche.core.fact_event_logs
where -- tx_hash='0x4dcf1ce24a0ddef9cfa3ab5434de5af9e2e9ac8b10fb5bc34003ab918eb39037' and
contract_address = lower('0x0cD070285380cabfc3be55176928dc8A55e6d2A7')
),
c as (
select
b.tx_hash
from
avalanche.core.fact_event_logs b
inner join a on a.tx_hash = b.tx_hash
where --tx_hash='0x4dcf1ce24a0ddef9cfa3ab5434de5af9e2e9ac8b10fb5bc34003ab918eb39037' and
contract_address = '0x5029c0eff6c34351a0cec334542cdb22c7928f78'
),
d as (select
ft.block_timestamp as t,
ft.tx_hash,
ft.from_address, avax_value
from
avalanche.core.fact_transactions ft
inner join c on c.tx_hash = ft.tx_hash)
select count(distinct tx_hash) as n_deposit_txn,
count(distinct from_address) as n_depositor_address
from d
limit
100
Run a query to Download Data