princefarzamWhale Action
Updated 2022-02-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
›
⌄
-- latest day
WITH latest_date as (
SELECT
DATE_TRUNC('day', date) AS day
FROM terra.daily_balances
ORDER BY day DESC
LIMIT 1),
whales as (
SELECT
day,
address,
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 address_name IS NULL
GROUP BY 1, 2
ORDER BY total_bal_usd DESC
LIMIT 30)
SELECT *
FROM terra.swaps as s
JOIN whales as w
ON w.address = s.trader --Trader address for this swap
WHERE token_1_amount_usd > 400000
ORDER BY s.block_timestamp DESC
LIMIT 30;
Run a query to Download Data