ellerydurwinTotaly USDT swaps
Updated 2024-12-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 tab1 AS (
SELECT
count(distinct swapper) AS swappers,
count(tx_hash) AS swaps,
count(distinct token_out) AS token_out,
sum((coalesce (amount_out_usd, amount_in_usd))) AS volume,
avg((coalesce (amount_out_usd, amount_in_usd))) AS Avg_volume
FROM
aptos.defi.ez_dex_swaps
WHERE
block_timestamp :: date BETWEEN DATE '2024-01-01'
AND current_date - INTERVAL '1 day'
AND TOKEN_IN IN ('0x8d87a65ba30e09357fa2edea2c80dbac296e5dec2b18287113500b902942929d::celer_coin_manager::UsdtCoin',
'0xa2eda21a58856fda86451436513b867c97eecb4ba099da5775520e0f7492e852::coin::T',
'0xacd014e8bdf395fa8497b6d585b164547a9d45269377bdf67c96c541b7fec9ed::coin::T',
'0xd6a19f4bcacb689db4448f7b2b017f8458b5b385a41b56d5438ef57ef5f57ceb::coin::T',
'0xd852c04860a79f9f032985133a9397d79727a737bad397d13a07c4e7d64bf812::coin::T',
'0xdf83dcb9f3f27d1728ccc675a290059c617dee9f52c07cd76438b1a58a5da48b::coin::T',
'0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::USDT'
)
)
SELECT
swappers,
swaps,
volume,
Avg_volume,
token_out as Token_out_number,
volume / NULLIF(swappers, 0) AS volume_per_swapper,
swaps / NULLIF(swappers, 0) AS swaps_per_swapper
FROM
tab1
QueryRunArchived: QueryRun has been archived