AnalyticSagestrading-activity-user-category
Updated 2024-04-07
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
›
⌄
WITH AllSwapData AS (
SELECT
'arbitrum' AS platform,
origin_from_address,
tx_hash,
CASE
WHEN amount_in_usd IS NULL THEN amount_out_usd
ELSE amount_in_usd
END AS usd_volume,
CASE
WHEN usd_volume > 1000000 THEN 'Whale'
WHEN usd_volume <= 1000000 THEN 'Retail User'
END AS User_Category
FROM
arbitrum.defi.ez_dex_swaps
WHERE
(
AMOUNT_IN_USD BETWEEN AMOUNT_OUT_USD - 5000
AND AMOUNT_OUT_USD + 5000
)
AND platform = 'uniswap-v3'
GROUP BY
4,
1,
2,
3
),
BaseSwapData AS (
SELECT
'base' AS platform,
origin_from_address,
tx_hash,
CASE
WHEN amount_in_usd IS NULL THEN amount_out_usd
ELSE amount_in_usd
END AS usd_volume,
QueryRunArchived: QueryRun has been archived