Query editor
SELECT date_trunc('month', block_time) as month, 'eth' as asset_id, count(DISTINCT "from") as unique_contract_deployersFROM ethereum.transactionswhere date_trunc('day', block_time) >= TIMESTAMP {{start_of_month}}and date_trunc('day', block_time) <= TIMESTAMP {{end_of_month}}AND "to" IS NULLGROUP BY 1UNION ALLSELECT date_trunc('month', block_time) as month, 'matic' as asset_id, count(DISTINCT "from") as unique_contract_deployersFROM polygon.transactionswhere date_trunc('day', block_time) >= TIMESTAMP {{start_of_month}}and date_trunc('day', block_time) <= TIMESTAMP {{end_of_month}}AND "to" IS NULLGROUP BY 1UNION ALLSELECT date_trunc('month', block_time) as month, 'avax' as asset_id, count(DISTINCT "from") as unique_contract_deployersFROM avalanche_c.transactionswhere date_trunc('day', block_time) >= TIMESTAMP {{start_of_month}}and date_trunc('day', block_time) <= TIMESTAMP {{end_of_month}}AND "to" IS NULLGROUP BY 1UNION ALLSELECT date_trunc('month', block_time) as month, 'ftm' as asset_id, count(DISTINCT "from") as unique_contract_deployersFROM fantom.transactionswhere date_trunc('day', block_time) >= TIMESTAMP {{start_of_month}}and date_trunc('day', block_time) <= TIMESTAMP {{end_of_month}}AND "to" IS NULLGROUP BY 1UNION ALLSELECT date_trunc('month', block_time) as month, 'celo' as asset_id, count(DISTINCT "from") as unique_contract_deployersFROM celo.transactionswhere date_trunc('day', block_time) >= TIMESTAMP {{start_of_month}}and date_trunc('day', block_time) <= TIMESTAMP {{end_of_month}}AND "to" IS NULLGROUP BY 1UNION ALLSELECT date_trunc('month', block_time) as month, 'op' as asset_id, count(DISTINCT "from") as unique_contract_deployersFROM optimism.transactionswhere date_trunc('day', block_time) >= TIMESTAMP {{start_of_month}}and date_trunc('day', block_time) <= TIMESTAMP {{end_of_month}}AND "to" IS NULLGROUP BY 1UNION ALLSELECT date_trunc('month', block_time) as month, 'arb' as asset_id, count(DISTINCT "from") as unique_contract_deployersFROM arbitrum.transactionswhere date_trunc('day', block_time) >= TIMESTAMP {{start_of_month}}and date_trunc('day', block_time) <= TIMESTAMP {{end_of_month}}AND "to" IS NULLGROUP BY 1UNION ALLSELECT date_trunc('month', block_time) as month, 'base' as asset_id, count(DISTINCT "from") as unique_contract_deployersFROM base.transactionswhere date_trunc('day', block_time) >= TIMESTAMP {{start_of_month}}and date_trunc('day', block_time) <= TIMESTAMP {{end_of_month}}AND "to" IS NULLGROUP BY 1UNION ALLSELECT date_trunc('month', block_time) as month, 'sol' as asset_id, COUNT(distinct signer) as unique_contract_deployersfrom(SELECT tx.*, instruction.* FROM solana.transactions tx