Query editor
WITH all_users AS (-- 获取所有交易账户及其最早交易日期SELECTDATE_TRUNC('day', MIN(t.evt_block_time)) AS day,t."from" AS accountFROMerc20_ethereum.evt_Transfer AS tWHEREt.contract_address = 0x92d6c1e31e14520e676a687f0a93788b716beff5GROUP BYt."from"UNIONSELECTDATE_TRUNC('day', MIN(t.evt_block_time)) AS day,t."to" AS accountFROMerc20_ethereum.evt_Transfer AS tWHEREt.contract_address = 0x92d6c1e31e14520e676a687f0a93788b716beff5GROUP BYt."to"),first_transactions AS (-- 针对每个账户获取其最早的交易日期(即首次交易日)SELECTaccount AS user,MIN(day) AS first_transaction_dateFROMall_usersGROUP BYaccount),daily_interactions AS (-- 每日活跃用户(daily_users),包括所有当天首次交互的账户SELECTDATE_TRUNC('day', t.evt_block_time) AS day,t."from" AS accountFROMerc20_ethereum.evt_Transfer AS tWHEREt.contract_address = 0x92d6c1e31e14520e676a687f0a93788b716beff5UNIONSELECTDATE_TRUNC('day', t.evt_block_time) AS day,t."to" AS accountFROMerc20_ethereum.evt_Transfer AS tWHEREt.contract_address = 0x92d6c1e31e14520e676a687f0a93788b716beff5),daily_user_stats AS (-- 计算每日的活跃用户(daily_users)、新增用户(new_users)和累积用户(cumulative_users)SELECTday,COUNT(DISTINCT account) AS daily_users,COUNT(DISTINCT CASE WHEN day = first_transaction_date THEN account END) AS new_users,