MostlyData_Slot fee mod4 by leader
Updated 2025-01-21
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 leader_blocks_fee as(
select
block_id,
reward_amount_sol
from solana.gov.fact_rewards_fee
where
pubkey = '{{leader}}'
and ( (
'{{n_days}}' = 0
and block_timestamp >= cast('{{start_date}}' as timestamp)
and block_timestamp < cast('{{end_date}}' as timestamp)
)
or
(
'{{n_days}}' != 0
and block_timestamp > current_date() - interval '{{n_days}} days'
))
and reward_amount_sol < '{{fee_threshold}}'
)
,ordered_slots as (
select
*,
row_number() over (order by block_id) as row_num
from leader_blocks_fee
)
,grouped_slots as (
select
block_id,
reward_amount_sol,
floor((row_number() over (order by block_id) - 1) / 4) as group_id,
QueryRunArchived: QueryRun has been archived