princefarzamExcluded Addresses
Updated 2022-01-09
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
›
⌄
-- latest day
WITH latest_date as
(SELECT DATE_TRUNC('day', date) AS day
FROM terra.daily_balances
ORDER BY day DESC
LIMIT 1)
SELECT day, address, address_name, SUM(balance_usd) AS total_bal_usd
FROM terra.daily_balances, latest_date
WHERE DATE_TRUNC('day', date) = latest_date.day
AND currency LIKE 'LUNA'
AND LENGTH(address_name) > 1
GROUP BY 1, 2, 3
ORDER BY total_bal_usd DESC
LIMIT 10;
Run a query to Download Data