theericstoneActive Address Comps
Updated 2022-10-03Copy 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
activehold as (
SELECT
count(distinct(user_address)) as n_active_holders,
lower('{{token_contract}}') as contract
FROM
ethereum.core.ez_balance_deltas
where block_timestamp > current_date - {{daysago}}
and contract_address = lower('{{token_contract}}')
),
activeaddys as (
SELECT
count(distinct(from_address)) as n_active_addys,
lower('{{token_contract}}') as contract
from
ethereum.core.fact_transactions
where block_timestamp > current_date - {{daysago}}
and to_address = lower('{{token_contract}}')
),
projectname as (
select address_name,
trim(substr(address_name,1,4)) as short_name,
lower('{{token_contract}}') as contract
from ethereum.core.dim_labels
where address = lower('{{token_contract}}')
), voters as (
SELECT
count(distinct(voter)) as n_voters,
lower('{{token_contract}}') as contract,
(select short_name from projectname) as short_name,
concat('%',short_name,'%')
from ethereum.core.ez_snapshot
where proposal_end_time > current_date - {{daysago}}
and space_id ilike concat('%',short_name,'%')
)
Run a query to Download Data