nsa2000Staked MATIC Amount and Other Transaction in Polygon Network
Updated 2022-09-21Copy Reference Fork
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
›
⌄
WITH stake_txs AS (
SELECT
COUNT(tx_hash) AS "Number of Stakes",
COUNT(DISTINCT origin_from_address) AS "Number of Stakers",
SUM(amount) AS "Staked Matic Amount",
SUM(amount_usd) AS "Staked USD Amount"
FROM ethereum.core.ez_token_transfers
WHERE to_address = '0x5e3ef299fddf15eaa0432e6e66473ace8c13d908'
AND from_address <> '0x0000000000000000000000000000000000000000'
AND block_timestamp::DATE >= '2022-07-01'
),
matic_circulation AS (
SELECT
SUM(amount) AS "Circulation Matic Amount",
SUM(amount_usd) AS "Circulation USD Amount"
FROM polygon.core.ez_matic_transfers
WHERE block_timestamp::DATE >= '2022-07-01'
)
SELECT 'Stake' AS label,
"Staked Matic Amount" AS "Matic Amount",
"Staked USD Amount" AS "USD Amount"
FROM stake_txs
UNION
SELECT 'Other Transfers' AS label,
SUM("Circulation Matic Amount") - SUM("Staked Matic Amount") AS "Matic Amount",
SUM("Circulation USD Amount") - SUM("Staked USD Amount") AS "USD Amount"
FROM stake_txs, matic_circulation
ORDER BY 2
Run a query to Download Data