winnie-fsNet Buying and Selling of RUNE by Whales over the past 10 days (in USD) copy
Updated 2024-06-21
999
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
›
⌄
-- forked from Rayyyk / Net Buying and Selling of RUNE by Whales over the past 10 days (in USD) @ https://flipsidecrypto.xyz/Rayyyk/q/tOU3MwtaeB-M/net-buying-and-selling-of-rune-by-whales-over-the-past-10-days-in-usd
with inflow_current as (select to_address,
sum(amount_e8/1e8) as rune_inflow_current
from thorchain.core.fact_transfer_events
where asset = 'THOR.RUNE'
group by 1),
outflow_current as (select from_address,
sum(amount_e8/1e8) as rune_outflow_current
from thorchain.core.fact_transfer_events
where asset = 'THOR.RUNE'
group by 1),
holdings_current as (select ifnull(to_address, from_address) as holder_current,
ifnull(rune_inflow_current, 0) - ifnull(rune_outflow_current, 0) as rune_holding_current
from inflow_current a
full outer join outflow_current b on a.to_address = b.from_address),
final_current as (select holder_current,
sum(rune_holding_current) as total_holdings_current
from holdings_current
where holder_current not in ('thor1dheycdevq39qlkxs2a6wuuzyn4aqxhve4qxtxt', --Reserve Module
'thor17gw75axcnr8747pkanye45pnrwk7p9c3cqncsv', --Bond Module
'thor1lj62pg6ryxv2htekqx04nv7wd3g98qf9gfvamy', --Standby Reserve
'thor1g98cy3n9mmjrpn0sxmn63lztelera37n8n67c0', --Pool Module
'thor1cqg8pyxnq03d88cl3xfn5wzjkguw5kh9enwte4', --Binance Cold
'thor1nm0rrq86ucezaf8uj35pq9fpwr5r82clphp95t', --Kraken
'thor1505gp5h48zd24uexrfgka70fg8ccedafsnj0e3', --Treasury1
'thor1lrnrawjlfp6jyrzf39r740ymnuk9qgdgp29rqv', --Vested Wallet1
'thor1t60f02r8jvzjrhtnjgfj4ne6rs5wjnejwmj7fh', --Binance Hot
'thor14n2q7tpemxcha8zc26j0g5pksx4x3a9xw9ryq9', --Treasury2
'thor16qnm285eez48r4u9whedq4qunydu2ucmzchz7p', --Vested Wallet2
'thor1egxvam70a86jafa8gcg3kqfmfax3s0m2g3m754', --TreasuryLP
'thor1ty6h2ll07fqfzumphp6kq3hm4ps28xlm2l6kd6', --crypto.com
'thor1v8ppstuf6e3x0r4glqc68d5jqcs2tf38cg2q6y', --Synth Module
QueryRunArchived: QueryRun has been archived