jackguyBase_ez_5
Updated 2023-09-11
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
›
⌄
with tab1 as (
SELECT
DISTINCT sender as users
FROM axelar.core.ez_squid
WHERE DESTINATION_CHAIN LIKE 'base'
OR SOURCE_CHAIN LIKE 'base'
)
SELECT
CASE when active_days = 1 then 'a 1 Active Day'
when active_days < 5 then 'b 2 - 5 Active Days'
when active_days < 10 then 'c 5 - 10 Active Days'
when active_days < 30 then 'd 10 - 30 Active Days'
else 'e 30+ Active Days' end as active_day_group,
count(*) as active_users
FROM (
SELECT
from_address,
count(DISTINCT tx_hash) as events,
count(DISTINCT date_trunc('day', block_timestamp)) as active_days
FROM base.core.fact_transactions
GROUP BY 1
)
WHERE from_address in (SELECT * FROM tab1)
GROUP BY 1
Run a query to Download Data