-- How many addresses on the MATIC network are active? What’s the daily evolution of active addresses? Is the activeness related some how to the price?
-- Hint: Active address is an address that has done at least one transaction or has received at least once a token in the past 3 months.
WITH
active_users_n as (
SELECT
trunc(block_timestamp,'day') as date,
count(distinct from_address) as active_users
from flipside_prod_db.polygon.transactions
group by 1
),
active_users_2_n as (
SELECT
trunc(block_timestamp,'day') as date,
count(distinct to_address) as active_users
from flipside_prod_db.polygon.transactions
group by 1
)
select 'Initiating transactions' as type,* from active_users_n
UNION
select 'Receiving tokens' as type,* from active_users_2_n