SalehL-H-whales buying or selling?
Updated 2022-10-07
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 lst_whales as (
select top 10
tx:body:messages[0]:to_address as wallet
,sum(fee) as fee_volume
,count(DISTINCT tx_id) as tx_count
,sum(tx:body:messages[0]:amount[0]:amount)/1e6 as luna_volume
from terra.core.fact_transactions
where FEE_DENOM='uluna'
and TX_SUCCEEDED=true
and tx:body:messages[0]:amount[0]:amount/1e6>0
group by 1
order by luna_volume desc
)
, lst_selling as (
select top 10
block_timestamp::date as date
-- ,tx:body:messages[0]:to_address as wallet
,sum(fee) as fee_volume
,count(DISTINCT tx_id) as tx_count
,sum(tx:body:messages[0]:amount[0]:amount)/1e6 as luna_volume
from terra.core.fact_transactions
where FEE_DENOM='uluna'
and TX_SUCCEEDED=true
and tx:body:messages[0]:amount[0]:amount/1e6>0
and tx:body:messages[0]:to_address in(select wallet from lst_whales)
group by 1
order by luna_volume desc
)
,lst_buying as (
select top 10
block_timestamp::date as date
-- ,tx:body:messages[0]:from_address as wallet
,sum(fee) as fee_volume
,count(DISTINCT tx_id) as tx_count
,sum(tx:body:messages[0]:amount[0]:amount)/1e6 as luna_volume
from terra.core.fact_transactions
Run a query to Download Data