Query editor
WITH deposits AS (SELECT"from" AS depositor_address,SUM(value / 1e18) AS total_deposits_ethFROMethereum."transactions"WHERE"to" = 0x1F75881DC0707b5236f739b5B64A87c211294AbbAND value > 0GROUP BY"from"),unique_deposits AS (SELECTdepositor_address,SUM(total_deposits_eth) AS total_deposits_ethFROMdepositsGROUP BYdepositor_address),deposit_ranges AS (SELECTCASEWHEN total_deposits_eth >= 0 AND total_deposits_eth < 0.05 THEN '0 - 0.05 ETH'WHEN total_deposits_eth >= 0.05 AND total_deposits_eth < 0.1 THEN '0.05 - 0.1 ETH'WHEN total_deposits_eth >= 0.1 AND total_deposits_eth < 0.2 THEN '0.1 - 0.2 ETH'WHEN total_deposits_eth >= 0.2 AND total_deposits_eth < 0.3 THEN '0.2 - 0.3 ETH'WHEN total_deposits_eth >= 0.3 AND total_deposits_eth < 0.4 THEN '0.3 - 0.4 ETH'WHEN total_deposits_eth >= 0.4 AND total_deposits_eth < 0.5 THEN '0.4 - 0.5 ETH'WHEN total_deposits_eth >= 0.5 AND total_deposits_eth < 1 THEN '0.5 - 1 ETH'WHEN total_deposits_eth >= 1 AND total_deposits_eth < 5 THEN '1 - 5 ETH'WHEN total_deposits_eth >= 5 AND total_deposits_eth < 10 THEN '5 - 10 ETH'WHEN total_deposits_eth >= 10 AND total_deposits_eth < 30 THEN '10 - 30 ETH'WHEN total_deposits_eth >= 30 AND total_deposits_eth < 100 THEN '30 - 100 ETH'ELSE '100+ ETH'END AS deposit_range,COUNT(*) AS number_of_depositorsFROMunique_depositsWHEREtotal_deposits_eth >= 0 -- Исключаем отрицательные депозитыGROUP BYCASEWHEN total_deposits_eth >= 0 AND total_deposits_eth < 0.05 THEN '0 - 0.05 ETH'WHEN total_deposits_eth >= 0.05 AND total_deposits_eth < 0.1 THEN '0.05 - 0.1 ETH'WHEN total_deposits_eth >= 0.1 AND total_deposits_eth < 0.2 THEN '0.1 - 0.2 ETH'WHEN total_deposits_eth >= 0.2 AND total_deposits_eth < 0.3 THEN '0.2 - 0.3 ETH'WHEN total_deposits_eth >= 0.3 AND total_deposits_eth < 0.4 THEN '0.3 - 0.4 ETH'WHEN total_deposits_eth >= 0.4 AND total_deposits_eth < 0.5 THEN '0.4 - 0.5 ETH'WHEN total_deposits_eth >= 0.5 AND total_deposits_eth < 1 THEN '0.5 - 1 ETH'WHEN total_deposits_eth >= 1 AND total_deposits_eth < 5 THEN '1 - 5 ETH'WHEN total_deposits_eth >= 5 AND total_deposits_eth < 10 THEN '5 - 10 ETH'WHEN total_deposits_eth >= 10 AND total_deposits_eth < 30 THEN '10 - 30 ETH'WHEN total_deposits_eth >= 30 AND total_deposits_eth < 100 THEN '30 - 100 ETH'ELSE '100+ ETH'END)SELECTdeposit_range,