ArioUser Activity on Base's DEXs -Selected DEX
Updated 2024-04-09
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
›
⌄
-- forked from User Activity on Base's DEXs @ https://flipsidecrypto.xyz/edit/queries/4678c2c0-d32a-41d7-a07e-a4cc50f604e5
-- forked from cloudr3n / 2023-05-31 12:39 PM @ https://flipsidecrypto.xyz/cloudr3n/q/mgs6bgUWhAma/2023-05-31-12-39-pm
select
week,
useractivity,
count(distinct ORIGIN_FROM_ADDRESS) as N_Users
from
(
select
distinct ORIGIN_FROM_ADDRESS,
count(distinct tx_hash) as "# of Swaps",
date_trunc('week', block_timestamp) as week,
case
when "# of Swaps" < 2 then 'A: 1 Swap'
when "# of Swaps" >= 2
and "# of Swaps" < 5 then 'B: 2-5 Swaps'
when "# of Swaps" >= 5
and "# of Swaps" < 10 then 'C: 5-10 Swaps'
when "# of Swaps" >= 10
and "# of Swaps" < 20 then 'D: 10-20 Swaps'
when "# of Swaps" >= 20
and "# of Swaps" < 50 then 'E: 20-50 Swaps'
when "# of Swaps" >= 50
and "# of Swaps" < 100 then 'F: 50-100 Swaps'
else 'G: >= 100'
end as useractivity
from
base.defi.ez_dex_swaps
where platform = '{{DEX}}'
group by
ORIGIN_FROM_ADDRESS,
week
)
group by
week,
QueryRunArchived: QueryRun has been archived