Query editor
WITH _ AS (SELECT ''), WALLETS AS (SELECT *FROM ton.accounts AWHERE 1=1AND cardinality(FILTER(A.interfaces, i->regexp_like(i, 'wallet_.*') )) > 0 -- wallet & highload)SELECTdate_format(block_date, '%x %v') week,date_format(min(block_date), '%Y-%m-%d') AS period_start,date_format(MAX(block_date), '%Y-%m-%d') AS period_end,COUNT(DISTINCT hash) as tx,COUNT(DISTINCT account) as accounts,COUNT(DISTINCT account) FILTER (WHERE t.compute_exit_code = 0AND t.action_result_code = 0AND t.hash = t.trace_idAND WALLETS.address IS NOT NULL) AS wallets,COUNT(DISTINCT WALLETS.address) FILTER (WHERE WALLETS.deployment_at >= date_trunc('week', T.block_date)AND WALLETS.deployment_at < date_trunc('week', T.block_date + INTERVAL '7' DAY)) AS new_walletsFROM ton.transactions TLEFT JOIN WALLETSON WALLETS.address = T.accountWHERE 1=1AND block_date BETWEENdate_trunc('week', NOW() - INTERVAL '32' DAY)AND date_trunc('week', NOW()) - INTERVAL '1' DAYGROUP BY 1ORDER BY period_start DESC