Query editor
WITH total AS (SELECTSUM(amount_staked) AS total_ethFROM staking_ethereum.deposits)SELECT*FROM (SELECTROW_NUMBER() OVER (ORDER BY SUM(amount_staked) DESC) AS ranking,CASEWHEN depositor_entity IS NULL THEN 'Other'ELSE depositor_entityEND AS entity,SUM(amount_staked) AS eth_deposited,SUM(amount_staked)/32 AS validators,SUM(amount_staked)/(SELECT total_eth FROM total) AS marketshareFROM staking_ethereum.depositsGROUP BY 2)mainORDER BY 1 ASC