WITH TCR_address AS (
SELECT
distinct user_address as TCRholders,
balance_date,
balance
FROM ethereum.erc20_balances
WHERE contract_address = '0x9c4a4204b79dd291d6b6571c5be8bbcd0622f050' --TCR DAO Token
and balance > 0
and balance_date = '2021-09-08'
),
Tokemak_users AS (
SELECT
block_timestamp::date as fecha,
count (distinct tx_from_address) as Tokemak_users
FROM ethereum.events_emitted
WHERE contract_address = '0x15a629f0665a3eb97d7ae9a7ce7abf73aeb79415' --Tokemak tTracer Token Reactor
and tx_from_address in (select TCRholders from TCR_address)
and fecha >= '2021-09-08'
GROUP BY 1
)
SELECT
*
FROM Tokemak_users