datavortexweekly
Updated 2025-02-03
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
›
⌄
SELECT
week,
staked_amount,
total_stakes,
stakers,
SUM(staked_amount) OVER (ORDER BY week) AS "cumulative_staked_amount",
SUM(total_stakes) OVER (ORDER BY week) AS "cumulative_total_stakes",
SUM(stakers) OVER (ORDER BY week) AS "cumulative_stakers"
FROM (
SELECT
DATE_TRUNC('week', block_timestamp) AS week,
SUM((DECODED_LOG:value::int) / 1e18) AS staked_amount,
COUNT(DISTINCT tx_hash) AS total_stakes,
COUNT(DISTINCT origin_from_address) AS stakers
FROM
kaia.core.ez_decoded_event_logs
WHERE
event_name = 'StakeKlay'
AND block_timestamp >= '2024-08-29'
GROUP BY
week
) AS weekly_data
ORDER BY
week DESC;
QueryRunArchived: QueryRun has been archived