AephiaUSTUR Starbases upkeep
Updated 2024-06-01
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 days AS (
SELECT
current_date - 3 as date_begin
,datediff(day, date_begin, current_date) as days
)
,upkeep AS (
select
hour(block_timestamp) as hour
,days
-----------
,103 * 60 * 60 as food_t1
,154 * 60 * 60 as food_t2
,206 * 60 * 60 as food_t3
,258 * 60 * 60 as food_t4
,309 * 60 * 60 as food_t5
,361 * 60 * 60 as food_t6
,77 * 60 * 60 as tool_t1
,116 * 60 * 60 as tool_t2
,154 * 60 * 60 as tool_t3
,193 * 60 * 60 as tool_t4
---UST-1---
,count(case when value:parsed:info:mint::string = 'foodQJAztMzX1DKpLaiounNe2BDMds5RNuPC6jsNrDG'
AND instruction:accounts[1] = '94LdKdSHuG3Na6H1YhkgJsq1caYVxUNeBRm7rLB6hd8k'
AND value:parsed:type = 'burn'
then signers[0] end) as UST_1_wallets_food
,sum(case when value:parsed:info:mint::string = 'foodQJAztMzX1DKpLaiounNe2BDMds5RNuPC6jsNrDG'
AND instruction:accounts[1] = '94LdKdSHuG3Na6H1YhkgJsq1caYVxUNeBRm7rLB6hd8k'
AND value:parsed:type = 'burn'
then value:parsed:info:amount
end) / days as UST_1_FOOD_burn
,-food_t6 as UST_1_food_upkeep
QueryRunArchived: QueryRun has been archived