Bera TeamInteraction
Updated 2025-01-31
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
›
⌄
-- Usage of Contracts by Users
with Contracts as ( select ORIGIN_FROM_ADDRESS,
count(DISTINCT block_timestamp::date) as "Active Days",
count(DISTINCT tx_hash) as "Transactions",
count(DISTINCT contract_address) as contracts,
from berachain.testnet.fact_event_logs
group by 1)
select count(DISTINCT origin_from_address) as "Users",
case when contracts = 1 then 'a. 1 Contract'
when contracts = 2 then 'b. 2 Contracts'
when contracts = 3 then 'c. 3 Contracts'
when contracts = 4 then 'd. 4 Contracts'
when contracts = 5 then 'e. 5 Contracts'
when contracts = 6 then 'f. 6 Contracts'
when contracts = 7 then 'g. 7 Contracts'
when contracts = 8 then 'h. 8 Contracts'
when contracts = 9 then 'i. 9 Contracts'
when contracts = 10 then 'j. 10 Contracts'
when contracts > 10 then 'k. > 10 Contracts' end as breakdown
from contracts
group by 2
order by 2 asc
QueryRunArchived: QueryRun has been archived