MLDZMNffuser5
Updated 2023-06-10
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
›
⌄
with t1 as (select
distinct signers[0] as users
from solana.core.fact_transactions s
left join solana.core.fact_transfers a on s.tx_id=a.tx_id
where array_contains('Program log: Instruction: CompleteSwap'::variant, log_messages)
and INSTRUCTIONS[0]:programId= '8guzmt92HbM7yQ69UJg564hRRX6N4nCdxWE5L6ENrA8P'
and MINT in ('So11111111111111111111111111111111111111112')
and (INNER_INSTRUCTIONS[1]:instructions[0]:parsed:info:destination = tx_to or
tx_from = INNER_INSTRUCTIONS[1]:instructions[0]:parsed:info:destination )
and s.BLOCK_TIMESTAMP>=current_date-{{Days_back}}
and SUCCEEDED='TRUE'
)
select
l.LABEL as project,
count(distinct t.signers[0]) as sender,
count(distinct t.tx_id) as no_txn
from solana.core.fact_events t join solana.core.dim_labels l on t.PROGRAM_ID = l.address
where t.block_timestamp>= current_date- {{Days_back}}
and l.label_subtype != 'token_contract'
and l.LABEL_TYPE in ('defi','nft','dex','dapp')
and l.label != 'solana'
and t.succeeded = TRUE
and t.signers[0] in (select users from t1)
and l.LABEL <> 'famous fox federation'
group by 1
order by 2 desc limit 10
Run a query to Download Data