Soheil_MKUntitled Query
Updated 2023-02-15
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 withdraw1 as (
select
TX_SIGNER as wallet,
sum((DEPOSIT/pow(10,24))) as near_amounts
from near.core.fact_transfers
where STATUS='TRUE'
and DEPOSIT is not null
group by 1
),
deposit1 as (
select
TX_RECEIVER as wallet,
sum((DEPOSIT/pow(10,24))) as near_amounts
from near.core.fact_transfers
where STATUS='TRUE'
and DEPOSIT is not null
group by 1
),
whales as (
select
a.wallet::varchar as whale,
round(sum(a.near_amounts-b.near_amounts)) as near_balance
from deposit1 a
join withdraw1 b
on a.wallet=b.wallet
where a.wallet not in (select address from near.core.dim_address_labels)
group by 1
order by 2 desc
limit 20
),
near_price as (
Run a query to Download Data