Query editor
SELECTSUM(amount_usd) AS totalShieldedVolumeUSD,SUM(IF(blockchain = 'ethereum', amount_usd, 0)) AS ethereumShieldedVolumeUSD,SUM(IF(blockchain = 'bnb', amount_usd, 0)) AS bnbShieldedVolumeUSD,SUM(IF(blockchain = 'arbitrum', amount_usd, 0)) AS arbitrumShieldedVolumeUSD,SUM(IF(blockchain = 'polygon', amount_usd, 0)) AS polygonShieldedVolumeUSD,SUM(IF(type = 'Inflow', amount_usd, 0)) AS inflowShieldedVolumeUSD,SUM(IF(type = 'Outflow', amount_usd, 0)) AS outflowShieldedVolumeUSD,SUM(IF(type = 'Inflow', amount_usd, 0)) - SUM(IF(type = 'Outflow', amount_usd, 0)) AS netFlowShieldedUSD,SUM(fee_usd) AS feesUSD,COUNT(IF(type = 'Inflow', 1, NULL)) AS inflowShieldedTransfers,COUNT(IF(type = 'Outflow', 1, NULL)) AS outflowShieldedTransfers,COUNT(evt_tx_hash) AS totalTransfers,SUM(IF(blockchain = 'ethereum' AND type = 'Inflow', amount_usd, 0)) AS ethereumInflowUSD,SUM(IF(blockchain = 'ethereum' AND type = 'Outflow', amount_usd, 0)) AS ethereumOutflowUSD,SUM(IF(blockchain = 'bnb' AND type = 'Inflow', amount_usd, 0)) AS bnbInflowUSD,SUM(IF(blockchain = 'bnb' AND type = 'Outflow', amount_usd, 0)) AS bnbOutflowUSD,SUM(IF(blockchain = 'arbitrum' AND type = 'Inflow', amount_usd, 0)) AS arbitrumInflowUSD,SUM(IF(blockchain = 'arbitrum' AND type = 'Outflow', amount_usd, 0)) AS arbitrumOutflowUSD,SUM(IF(blockchain = 'polygon' AND type = 'Inflow', amount_usd, 0)) AS polygonInflowUSD,SUM(IF(blockchain = 'polygon' AND type = 'Outflow', amount_usd, 0)) AS polygonOutflowUSD,SUM(IF(type = 'Inflow', amount_usd, 0)) / COUNT(evt_tx_hash) AS averageInflowTx,SUM(IF(type = 'Outflow', amount_usd, 0)) / COUNT(evt_tx_hash) AS averageOutflowTx,SUM(IF(blockchain = 'ethereum' AND type = 'Inflow', amount_usd, 0)) / COUNT(IF(blockchain = 'ethereum', 1, NULL)) AS averageEthereumInflowTx,SUM(IF(blockchain = 'ethereum' AND type = 'Outflow', amount_usd, 0)) / COUNT(IF(blockchain = 'ethereum', 1, NULL)) AS averageEthereumOutflowTx,SUM(IF(blockchain = 'bnb' AND type = 'Inflow', amount_usd, 0)) / COUNT(IF(blockchain = 'bnb', 1, NULL)) AS averageBnbInflowTx,SUM(IF(blockchain = 'bnb' AND type = 'Outflow', amount_usd, 0)) / COUNT(IF(blockchain = 'bnb', 1, NULL)) AS averageBnbOutflowTx,SUM(IF(blockchain = 'arbitrum' AND type = 'Inflow', amount_usd, 0)) / COUNT(IF(blockchain = 'arbitrum', 1, NULL)) AS averageArbitrumInflowTx,SUM(IF(blockchain = 'arbitrum' AND type = 'Outflow', amount_usd, 0)) / COUNT(IF(blockchain = 'arbitrum', 1, NULL)) AS averageArbitrumOutflowTx,SUM(IF(blockchain = 'polygon' AND type = 'Inflow', amount_usd, 0)) / COUNT(IF(blockchain = 'polygon', 1, NULL)) AS averagePolygonInflowTx,SUM(IF(blockchain = 'polygon' AND type = 'Outflow', amount_usd, 0)) / COUNT(IF(blockchain = 'polygon', 1, NULL)) AS averagePolygonOutflowTx,SUM(IF(blockchain = 'ethereum' AND type = 'Inflow', amount_usd, 0)) - SUM(IF(blockchain = 'ethereum' AND type = 'Outflow', amount_usd, 0)) AS ethereumNetFlowUSD,SUM(IF(blockchain = 'bnb' AND type = 'Inflow', amount_usd, 0)) - SUM(IF(blockchain = 'bnb' AND type = 'Outflow', amount_usd, 0)) AS bnbNetFlowUSD,SUM(IF(blockchain = 'arbitrum' AND type = 'Inflow', amount_usd, 0)) - SUM(IF(blockchain = 'arbitrum' AND type = 'Outflow', amount_usd, 0)) AS arbitrumNetFlowUSD,SUM(IF(blockchain = 'polygon' AND type = 'Inflow', amount_usd, 0)) - SUM(IF(blockchain = 'polygon' AND type = 'Outflow', amount_usd, 0)) AS polygonNetFlowUSDFROMquery_4616381