rajsAO Active Users and No of Txs
Updated 2022-09-04Copy 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,
min(block_timestamp)
-- 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
group by 1
order by 2
)
,
req_tab as
(
SELECT
date_trunc('day', block_timestamp) as date,
count(distinct from_address) as active_odyssey_users,
count(*) as no_of_txs_odyssey_users
from arbitrum.core.fact_transactions
where from_address IN
(
SELECT
new_users
Run a query to Download Data