Pmisha-bmlMdxusers.participate.on.other.vaults
Updated 2022-03-28
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
›
⌄
with t1 as(select
distinct INNER_INSTRUCTION:instructions[0]:parsed:info:authority as user_total
from solana.fact_events
where block_timestamp>='2022-02-01'
and PROGRAM_ID='1349iiGjWC7ZTbu6otFmJwztms122jEEnShKgpVnNewy'
and (INNER_INSTRUCTION:instructions[0]:parsed:info:destination='8vyTqVVPmJfqFexRcMBGDAHoSCyZ52RC5sRVhYzbfU4j'
or INNER_INSTRUCTION:instructions[0]:parsed:info:destination='ELds55KR26LFYij54C2go84LAMVUWhkc5MpUrMo7nhkK'
or INNER_INSTRUCTION:instructions[0]:parsed:info:destination='7octQkJziMmSCT8bZgEQFNS24NrcJFWm7AoWVXXCuS7g'
or INNER_INSTRUCTION:instructions[0]:parsed:info:destination='2qFUu5YDGuzhdTS87rWpwUbqytMsEb2RTyFzpiV3duDV'
or INNER_INSTRUCTION:instructions[0]:parsed:info:destination='ExYw16EKeLm21r1D5wrG8Mk6jGzJpDSjxPCmAAz33kBC')
group by 1)
select
CASE
when INNER_INSTRUCTION:instructions[0]:parsed:info:destination='8vyTqVVPmJfqFexRcMBGDAHoSCyZ52RC5sRVhYzbfU4j' then 'SOL-Vault'
when INNER_INSTRUCTION:instructions[0]:parsed:info:destination='ELds55KR26LFYij54C2go84LAMVUWhkc5MpUrMo7nhkK' then 'MSOL-Vault'
when INNER_INSTRUCTION:instructions[0]:parsed:info:destination='7octQkJziMmSCT8bZgEQFNS24NrcJFWm7AoWVXXCuS7g' then 'BTC-Vault'
when INNER_INSTRUCTION:instructions[0]:parsed:info:destination='2qFUu5YDGuzhdTS87rWpwUbqytMsEb2RTyFzpiV3duDV' then 'ETH-Vault'
when INNER_INSTRUCTION:instructions[0]:parsed:info:destination='ExYw16EKeLm21r1D5wrG8Mk6jGzJpDSjxPCmAAz33kBC' then 'wLUNA-Vault'
end as covered_call_vault,
count(distinct INNER_INSTRUCTION:instructions[0]:parsed:info:authority) as user_vault
from solana.fact_events
where block_timestamp>='2022-02-01'
and PROGRAM_ID='1349iiGjWC7ZTbu6otFmJwztms122jEEnShKgpVnNewy'
and INNER_INSTRUCTION:instructions[0]:parsed:info:authority in (select user_total from t1)
group by 1 having covered_call_vault is not null
Run a query to Download Data