LTirrellunknown_program_id-summary_by_hour_of_day
Updated 2023-08-19
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
›
⌄
-- forked from unknown_program_id-summary @ https://flipsidecrypto.xyz/edit/queries/ca993505-be28-443a-93bc-cd47196e2c1e
-- forked from unknown_program_id-base @ https://flipsidecrypto.xyz/edit/queries/2e55eafc-59d8-451c-a46f-5bf2a6b084b8
-- forked from unknown_program_id-data_check @ https://flipsidecrypto.xyz/edit/queries/dac0f4a4-3dd9-415c-b538-d4a5d5e10ba3
with
base as (
SELECT
t.block_timestamp,
t.tx_id,
e.inner_instruction['instructions'] [0] ['parsed'] ['info'] ['source'] as sender,
e.inner_instruction['instructions'] [0] ['parsed'] ['info'] ['destination'] as receiver,
e.inner_instruction['instructions'] [0] ['parsed'] ['info'] ['lamports'] / pow(10, 9) as amount,
t.pre_balances[0] / pow(10, 9) as sender_pre,
t.post_balances[0] / pow(10, 9) as sender_post,
t.pre_balances[1] / pow(10, 9) as receiver_pre,
t.post_balances[1] / pow(10, 9) as receiver_post,
t.fee,
t.units_consumed,
t.units_limit,
t.tx_size,
t.log_messages
FROM
solana.core.fact_transactions t
inner join solana.core.fact_events e on t.tx_id = e.tx_id
where
e.program_id = '3Kr1RcL41pWL7qzAA5tCTTKcqjbG3RNRsFaDGMd82iW4'
and e.block_timestamp::date >= CURRENT_DATE - {{date_range}}
and e.succeeded = true
and t.block_timestamp::date >= CURRENT_DATE - {{date_range}}
and t.succeeded = true
order by
t.block_timestamp desc
),
hours as (
SELECT
*
from
Run a query to Download Data