0xHaM-dklayswap User Label Count
Updated 2025-02-23
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 timeframe AS (
SELECT date_day AS date
FROM crosschain.core.dim_dates
),
swapEvent as (
select
block_timestamp,
platform,
tx_hash,
ORIGIN_FROM_ADDRESS as swapper,
symbol_in,
symbol_out,
amount_in_usd,
amount_out_usd,
nvl(amount_in_usd, amount_out_usd) as amount_usd
from kaia.defi.ez_dex_swaps
WHERE platform ilike 'klayswap%'
)
,
get_volume_per_user as (
SELECT
swapper as trader ,
sum(amount_usd) as total_volume
FROM swapEvent
group by 1
)
-- forked from 0xDataWolf / Retention Pareto Demo @ https://flipsidecrypto.xyz/0xDataWolf/q/6IUCfIcpSTMC/retention-pareto-demo
, get_cumulative_count as (
select
* , sum(total_volume) over(order by total_volume desc) as cumulative_count
from get_volume_per_user
)
, get_pct_of_cumulative_count as(
select
QueryRunArchived: QueryRun has been archived