maytsu2024-05-13 Luna on DEX
Updated 2024-05-15
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
›
⌄
------ BSC
/* -- check symbols for Luna
--BSC_UST-USDC_buyvol sur toutes les pools à la fois as
select
SYMBOL_IN,
SYMBOL_OUT
from bsc.defi.ez_dex_swaps
where BLOCK_TIMESTAMP<'2022-05-14 00:00:00.000'
and BLOCK_TIMESTAMP>'2022-05-01 00:00:00.000'
--and (POOL_NAME='UST-USDC')
group by 1,2--,3,4--,5,6
--= LUNA or BLUNA
select
DATE_TRUNC('minute', block_timestamp) as date,
SYMBOL_IN,
SYMBOL_OUT,
POOL_NAME,
CONTRACT_ADDRESS,
PLATFORM,
AVG(AMOUNT_OUT) AS avg_vol,
max(AMOUNT_OUT) AS max_vol,
min(AMOUNT_OUT) AS min_vol,
SUM(AMOUNT_OUT) as vol_total,
AVG(AMOUNT_IN* 1.0 /AMOUNT_OUT) AS avg_price,
max(AMOUNT_IN* 1.0 /AMOUNT_OUT) AS max_price,
min(AMOUNT_IN* 1.0 /AMOUNT_OUT) AS min_price,
COUNT(DISTINCT TX_HASH) as count
from bsc.defi.ez_dex_swaps
where BLOCK_TIMESTAMP<'2022-05-14 00:00:00.000'
and BLOCK_TIMESTAMP>'2022-05-01 00:00:00.000'
--and (POOL_NAME='UST-USDC')
and (SYMBOL_OUT='LUNA' or SYMBOL_OUT='BLUNA')
group by 1,2,3,4,5,6
QueryRunArchived: QueryRun has been archived