shadilFriktion Lightning OGs - deposit into the SOL covered call Friktion volt
Updated 2022-03-27
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
›
⌄
with ogs as (
select contract_address from solana.dim_nft_metadata
where project_name = 'Lightning OG'
),
transfred_in as (
SELECT
instruction:parsed:info:wallet::string as wallet,
count(DISTINCT tx_id) as counter
from solana.fact_events
where instruction:parsed:info:mint::string in (SELECT * from ogs)
and instruction:parsed:info:wallet::string is not NULL
and block_timestamp::date BETWEEN '2022-02-05' and CURRENT_DATE
GROUP By wallet
),
buys as (
select
NF.purchaser::string as wallet,
count(DISTINCT fe.tx_id) as counter
from solana.fact_nft_sales NF
join solana.fact_events fe on NF.tx_id = fe.tx_id
where NF.block_timestamp::date BETWEEN '2022-02-05' and CURRENT_DATE
and NF.mint in ( SELECT * from ogs)
AND (NF.program_id = 'MEisE1HzehtrDpAAT8PnLHjpSSkRYakotTuJRPjTpo8' or NF.program_id = 'M2mx93ekt1fmXSVkTrUL9xVFHkmME8HTUi5Cyc5aF7K')
GROUP By wallet
),
sells as (
select
fe.instruction:accounts[1]::string as wallet,
count(DISTINCT fe.tx_id) * -1 as counter
from solana.fact_nft_sales NF
join solana.fact_events fe on NF.tx_id = fe.tx_id
where NF.block_timestamp::date BETWEEN '2022-02-05' and CURRENT_DATE
AND (NF.program_id = 'MEisE1HzehtrDpAAT8PnLHjpSSkRYakotTuJRPjTpo8' or NF.program_id = 'M2mx93ekt1fmXSVkTrUL9xVFHkmME8HTUi5Cyc5aF7K')
and NF.mint in ( SELECT * from ogs)
Run a query to Download Data