Kruys-Collinsexplicit-azure
Updated 2024-09-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 staking_actions AS (
SELECT
delegator_address,
validator_address,
action,
amount,
CASE
WHEN action = 'delegate' THEN amount
WHEN action = 'undelegate' THEN -amount
ELSE 0
END AS net_amount
FROM
axelar.gov.fact_staking
WHERE
tx_succeeded = TRUE
),
net_staking AS (
SELECT
SUM(net_amount/1e6) AS total_staked
FROM
staking_actions
),
CurrentPrice AS (
SELECT
price
FROM crosschain.price.ez_prices_hourly
WHERE symbol = 'AXL'
ORDER BY hour DESC
LIMIT 1
)
SELECT
1165357101 AS "Axelar Total Supply",
ns.total_staked AS "Currently Staked AXL",
QueryRunArchived: QueryRun has been archived