binhachonUntitled Query
Updated 2022-03-22
999
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 deposit_transaction as (
select
block_timestamp,
tx_id,
inner_instruction:instructions[1]:parsed:info:authority::string as authority,
pretokenbalances[1]:mint::string as pretoken1,
pretokenbalances[2]:mint::string as pretoken2,
inner_instruction:instructions[1]:parsed:info:amount/1e6 as amount
from solana.events
where 1 = 1 --block_timestamp:: date >= '2022-01-28' -- tx_id = '5tKEXux8CGWfeMhd8cwzbQvFTHb1nfGriQYAt9cxenNmJkTTPvo9MNWWXexAJYJBa27cqQc12fML1xZfmVXh9FoX'
and instruction:programId::string = 'VoLT1mJz1sbnxwq5Fv2SXjdVDgPXrb9tJyC8WpMDkSp'
and pretokenbalances[0]:mint::string = '9n4nbM75f5Ui33ZbPYXn59EwSgE8CGsHtAeTH5YFeJ9E'
and pretoken1 != 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' --Weekly call sell
and authority != 'DA1M8mw7GnPNKU9ReANtHPQyuVzKZtsuuSbCyc2uX2du' --Friktion address
and inner_instruction:instructions[1]:parsed:type::string = 'transfer'
union all
select
block_timestamp,
tx_id,
inner_instruction:instructions[0]:parsed:info:authority::string as authority,
pretokenbalances[1]:mint::string as pretoken1,
pretokenbalances[2]:mint::string as pretoken2,
inner_instruction:instructions[0]:parsed:info:amount/1e6 as amount
from solana.events
where 1=1 --block_timestamp:: date >= '2022-01-28' -- tx_id = '5tKEXux8CGWfeMhd8cwzbQvFTHb1nfGriQYAt9cxenNmJkTTPvo9MNWWXexAJYJBa27cqQc12fML1xZfmVXh9FoX'
and instruction:programId::string = 'VoLT1mJz1sbnxwq5Fv2SXjdVDgPXrb9tJyC8WpMDkSp'
and pretokenbalances[0]:mint::string = '9n4nbM75f5Ui33ZbPYXn59EwSgE8CGsHtAeTH5YFeJ9E'
and pretoken1 != 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' --Weekly call sell
and authority != 'DA1M8mw7GnPNKU9ReANtHPQyuVzKZtsuuSbCyc2uX2du' --Friktion address
and inner_instruction:instructions[0]:parsed:type::string = 'transfer'
),
withdraw_tx_id as (
-- select
-- distinct tx_id
-- from solana.events
-- where instruction:programId::string = 'VoLT1mJz1sbnxwq5Fv2SXjdVDgPXrb9tJyC8WpMDkSp'
Run a query to Download Data