rajsAO New Users by # of Txs
Updated 2022-09-06Copy Reference Fork
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
›
⌄
with new_users AS
(
SELECT
from_address as new_users
-- count(case when nonce > 0 then 1 end) as returning_users,
-- count(*) as total_users,
-- avg(case when nonce > 0 then nonce end) as avg_txs_by_returning_users
-- avg(nonce) as avg_no_of_txs
from arbitrum.core.fact_transactions
where tx_hash IN
(
SELECT
tx_hash
from arbitrum.core.fact_event_logs
where contract_address = '0xfae39ec09730ca0f14262a636d2d7c5539353752'
and topics[0] = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
and topics[1] = '0x0000000000000000000000000000000000000000000000000000000000000000'
)
and nonce = 0
)
select
-- count(from_address) as airdrop_hunters
case when total_no_of_txs = 1 then '1 tx'
when total_no_of_txs > 1 and total_no_of_txs < 6 then '2-5 txs'
when total_no_of_txs > 5 and total_no_of_txs < 11 then '6-10 txs'
when total_no_of_txs > 10 and total_no_of_txs < 101 then '11-100 txs'
else '>100 txs'
end as txs_cat,
count(from_address) as no_of_users
FROM
(
SELECT
from_address,
count(*) as total_no_of_txs
-- count(*) / count(distinct from_address) as avg_no_of_txs
Run a query to Download Data