SpiltadavidOptimism Users Grouped by Number of Transactions
Updated 2023-01-21
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
›
⌄
with tab1 as (
select
FROM_ADDRESS,
count(*) as transactions
from optimism.core.fact_transactions
where BLOCK_TIMESTAMP >= CURRENT_DATE - 60
group by 1
Order by 2 DESC
)
select
CASE
when transactions < 5 then 'Less than 5 Transactions'
when transactions >= 5 and transactions < 10 then 'Between 5 and 10 Transactions'
when transactions >= 10 and transactions < 20 then 'Between 10 and 20 Transactions'
when transactions >= 20 and transactions < 30 then 'Between 20 and 30 Transactions'
when transactions >= 30 and transactions < 40 then 'Between 30 and 40 Transactions'
when transactions >= 40 and transactions < 50 then 'Between 40 and 50 Transactions'
Else 'Greater than 50 Transactions'
END as distribution,
count(*)
from tab1
group by 1
Run a query to Download Data