theericstoneBasic Activity
Updated 2022-10-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
›
⌄
-- number of tokens used
-- number of transactions
-- days since last active
-- active 3+ months prior
-- number of contracts engaged with
with n_tokens as (
SELECT
from_address as address,
count(distinct(contract_address)) as n_tokens
from optimism.core.fact_token_transfers
where block_timestamp > current_date - 90
group by 1
),
n_txns as (
SELECT
from_address as address,
count(distinct(tx_hash)) as n_txns_initiated,
timediff('day',max(block_timestamp),current_date) as days_since_active
FROM optimism.core.fact_transactions
where block_timestamp > current_date - 90
group by 1
),
active_3mo as (
SELECT
from_address as address,
count(1) as n_txns_3mo
FROM optimism.core.fact_transactions
where block_timestamp > current_date - 115
and block_timestamp < current_date - 85
group by 1
),
n_contracts as (
select
origin_from_address as address,
count(distinct(contract_address)) as n_contracts
Run a query to Download Data