KARTOD$RUNE holders
Updated 2022-06-26Copy 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
30
31
32
33
34
35
36
›
⌄
WITH amount_received AS (
SELECT
to_address,
SUM(rune_amount) as amount_received
FROM thorchain.transfers
GROUP BY to_address
),
amount_sent AS (
SELECT
from_address,
SUM(rune_amount) as amount_sent
FROM thorchain.transfers
GROUP BY from_address
),
address AS (
SELECT
to_address,
amount_received - amount_sent as rune_balance
FROM amount_received
INNER JOIN amount_sent ON amount_received.to_address = amount_sent.from_address
WHERE rune_balance > 0
),
ALL_HOLD AS (
SELECT
COUNT(DISTINCT to_address) AS "$RUNE holders"
FROM address
),
data as (
SELECT
rune_balance AS balance
FROM address
WHERE rune_balance > 0
Run a query to Download Data