Switchboard24m07_lease_extend
Updated 2024-11-05
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
›
⌄
-- forked from 24m6_lease_extend @ https://flipsidecrypto.xyz/edit/queries/09fb8802-3834-4de8-bdc3-764aa37bb6d1
-- forked from 22q1_lease_extend @ https://flipsidecrypto.xyz/edit/queries/252f6d8e-e992-42b6-8917-ba4a13f3e356
-- total leaseExtend ixns for time period
-- to query each authority address and the sum of time period
SELECT block_timestamp, tx_from AS authority, amount
FROM solana.core.fact_events
INNER JOIN solana.core.fact_transactions USING (tx_id, block_timestamp, succeeded)
INNER JOIN solana.core.fact_transfers USING (tx_id, block_timestamp)
INNER JOIN lateral flatten (input => log_messages) f
WHERE block_timestamp BETWEEN '2024-07-01' AND '2024-07-31'
AND succeeded
AND program_id = 'SW1TCH7qEPTdLsDHRgPuMQjbQxKdH2aBStViMFnt64f'
AND f.value LIKE 'Program log: Instruction: LeaseExtend'
ORDER BY block_timestamp
QueryRunArchived: QueryRun has been archived