adambalastake msol
Updated 2022-02-20
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
select
date_trunc('day',block_timestamp) as block_day,
case when tx_id = '3sqfijBvbrc39jbCddJc8bLRwZRnYyzdF7yBQH49SA5W7RcuxoRjLqmCTuLq7YhzoZTVNne9dbx3tA53CpWxMaZn'then 'me'
else 'everyone else' end as staker,
-- these three aren't involved in grouping or aggregating, let's remove them:
--instruction:programId as programid,
--inner_instruction:instructions[0]:parsed:info:source as source,
--inner_instruction:instructions[0]:parsed:info:amount / 1e9 as amount,
count(*) as stake_count
from solana.events
where block_timestamp >'2021-12-20' and block_timestamp <'2022-01-01'
-- on Solana we *always* add a small date range for query efficiency!
--AND tx_id = 'ngF3HJPi3g7WwkEXU7L4d8gRuggtLTq9cJ31tLXvhxqyet73oX23iaZiqL3cMv9o573xa4gjKqotrksB7N6unf1'
and instruction:programId = 'MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD'
and ( inner_instruction:instructions[0]:parsed:info:source = '7GgPYjS5Dza89wV6FpZ23kUJRG5vbQ1GM25ezspYFSoE' or inner_instruction:instructions[0]:parsed:info:destination = 'Du3Ysj1wKbxPKkuPPnvzQLQh8oMSVifs3jGZjJWXFmHN' )
and succeeded = TRUE
group by block_day, staker
-- limit 10 <-- notice we commented this out so we get all the results we want
Run a query to Download Data