mariyaInteraction with DeFi protocol
Updated 2022-04-18
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 wallets as (
SELECT
DISTINCT instruction:parsed:info:stakeAuthority::string as staker
from solana.events
where
succeeded='TRUE'
and
(instruction:programId='Stake11111111111111111111111111111111111111'
or event_type='delegate'
or event_type='deactivate')
),
platform_wallet as (
select lb.label as platform,
tx_id,
date(block_timestamp) as date
from solana.events ev
join solana.labels lb on lb.address = ev.instruction:programId
where (
inner_instruction:instructions[0]:parsed:info:authority in (SELECT * from wallets)
or inner_instruction:instructions[1]:parsed:info:authority in (SELECT * from wallets)
)
and date(block_timestamp) BETWEEN '2022-03-01'
and CURRENT_DATE - 2
)
SELECT date, platform, COUNT(DISTINCT tx_id) as tx_count
from platform_wallet
GROUP by date, platform
Run a query to Download Data