hessOverview of Staking Sweat (Last 30 Days)
Updated 2024-08-16
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 tb1 as ( select DISTINCT tx_signer as user
from near.core.fact_transactions a join near.core.dim_address_labels b on a.tx_receiver = b.address
where project_name ilike '%sweat%'
UNION
select DISTINCT tx_receiver as user
from near.core.fact_transactions a join near.core.dim_address_labels b on a.tx_signer = b.address
where project_name ilike '%sweat%'
)
,
tb2 as ( select block_timestamp,
tx_hash,
status_value,
replace(value, 'EVENT_JSON:') as json,
regexp_substr(status_value, 'Success') as reg_success,
try_parse_json(json):standard as standard,
try_parse_json(json):event as event,
try_parse_json(json):data as data_logs
from near.core.fact_receipts,
table(flatten(input => logs))
where 1=1
and receiver_id = 'token.sweat'
and reg_success is not null
and block_timestamp >= '2024-01-01'
),
tb3 AS ( select block_timestamp,
tx_hash,
standard,
event,
value:amount/pow(10,18) as amount,
value:owner_id as owner_id,
value:old_owner_id as old_owner_id,
value:new_owner_id as new_owner_id,
nvl(old_owner_id, 'mint') as from_address,
nvl(new_owner_id, owner_id) as to_address
from tb2, table(flatten(input => data_logs))
QueryRunArchived: QueryRun has been archived