Query editor
WITH monthly_stats AS (SELECTDATE_TRUNC('month', block_time) AS month,CASEWHEN data IS NULL AND value > 0THEN 'Simple ETH Transfer'ELSE 'Other Transfers'END AS transfer_type,COUNT(*) AS num_txFROM ethereum.transactionsWHEREblock_time >= TRY_CAST('2022-07-30' AS DATE)GROUP BY1,2), monthly_total_tx AS (SELECTmonth,SUM(num_tx) AS total_txFROM monthly_statsGROUP BYmonth)SELECTms.month,ms.transfer_type,ms.num_tx,(TRY_CAST(ms.num_tx AS DECIMAL) / NULLIF(TRY_CAST(mtt.total_tx AS DECIMAL), 0)) /* Calculate the percentage of each transfer type */ * 100 AS percentage_of_transfersFROM monthly_stats AS msJOIN monthly_total_tx AS mttON ms.month = mtt.monthWHEREms.transfer_type = 'Simple ETH Transfer'ORDER BYms.month