adriaparcerisasFlash Bounty: LUNA Head 3
Updated 2023-04-13
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
›
⌄
with
whales_movements as (
SELECT
block_timestamp,
TX:body:messages[0]:from_address as seller,
TX:body:messages[0]:to_address as buyer,
TX:body:messages[0]:amount[0]:amount/pow(10,6) as amount,
tx_id
from terra.core.fact_transactions
where tx:body:messages[0]:amount[0]:denom = 'uluna' and block_timestamp > '2022-05-28' and tx_succeeded = true
and amount >=1e4
)
SELECT
trunc(block_timestamp,'day') as date,
count(distinct tx_id) as txs,
count(distinct seller) as whales_selling,
whales_selling*(-1) as whales_sellings,
count(distinct buyer) as whales_buying,
whales_buying-whales_selling as net_whales_behavior,
sum(amount) as volume_moved
FROM whales_movements
group by 1
order by 1 asc
Run a query to Download Data