Sbhn_NPETH Buying & Selling Pressure Since November 1st
Updated 2023-01-19
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 table_1 as (select date_trunc('day', block_timestamp) as day,
count(distinct(origin_from_address)) as selling_eth_wallet,
sum(amount_in_usd) as eth_selling_vol,
sum(eth_selling_vol) over (order by day) as cumu_eth_selling_vol
from ethereum.core.ez_dex_swaps
where block_timestamp >= '2023-01-01' and block_timestamp <='2023-01-16'
and symbol_in in ('WETH', 'ETH')
group by 1),
table_2 as (select date_trunc('day', block_timestamp) as day,
count(distinct(origin_from_address)) as buying_eth_wallet,
sum(amount_out_usd) as eth_buying_vol,
sum(eth_buying_vol) over (order by day) as cumu_eth_buying_vol
from ethereum.core.ez_dex_swaps
where block_timestamp >= '2023-01-01' and block_timestamp <='2023-01-16'
and symbol_out in ('WETH', 'ETH')
group by 1),
table_3 as (select date_trunc('day', block_timestamp) as day,
count(distinct(origin_from_address)) as wallet_count
from ethereum.core.ez_dex_swaps
where block_timestamp >= '2023-01-01' and block_timestamp <='2023-01-16'
and (symbol_in in ('WETH', 'ETH')
or symbol_out in ('WETH', 'ETH'))
group by 1)
select a.day,
eth_selling_vol,
eth_selling_vol*-1,
eth_buying_vol,
eth_buying_vol - eth_selling_vol as net_volume,
cumu_eth_selling_vol,
cumu_eth_buying_vol,
case
when net_volume > 0 then 'Positive'
else 'Negative'
Run a query to Download Data