Anahitauser 7
Updated 2022-06-14Copy 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
29
30
31
32
33
34
35
36
›
⌄
select distinct "Vault ID", sum ("Number of Activity")
from((with remove as (with tx as (select distinct TX_HASH as txs
from ethereum.core.fact_event_logs
where ORIGIN_TO_ADDRESS = '0x0fc584529a2aefa997697fafacba5831fac0c22d'
and event_name = 'Transfer'
and event_inputs:tokenId is not null)
select distinct TX_HASH as tot
from ethereum.core.fact_event_logs
inner join tx on tx.txs=fact_event_logs.TX_HASH
where ORIGIN_TO_ADDRESS = '0x0fc584529a2aefa997697fafacba5831fac0c22d'
and event_name = 'Minted')
select distinct event_inputs:vaultId as "Vault ID",count(*) as "Number of Activity"
from ethereum.core.fact_event_logs
inner join remove on remove.tot=fact_event_logs.TX_HASH
where event_name = 'FeesReceived'
group by 1
order by 2 desc
)
union ALL
(with remove as (with tx as (select distinct TX_HASH as txs
from ethereum.core.fact_event_logs
where ORIGIN_TO_ADDRESS = '0x0fc584529a2aefa997697fafacba5831fac0c22d'
and event_name = 'Transfer'
and event_inputs:tokenId is not null)
select distinct TX_HASH as tot
from ethereum.core.fact_event_logs
inner join tx on tx.txs=fact_event_logs.TX_HASH
where ORIGIN_TO_ADDRESS = '0x0fc584529a2aefa997697fafacba5831fac0c22d'
and event_name = 'Redeemed')
select distinct event_inputs:vaultId as "Vault ID",count(*) as "Number of Activity"
Run a query to Download Data