Query editor
-- Optional: ENS Vision share of official .eth reg/renew ETH (NameRegistered / NameRenewed costs)WITH vision AS (SELECTdate_trunc('month', block_time) AS month,SUM(value) / 1e18 AS vision_ethFROM ethereum.transactionsWHERE successAND "to" IN (0xFca3DF2Bcd9c3D594923FFAe0f132BfA1e8297C4,0xB3f4598d27bC18F3A7E155dba5E31083c9e1Ec3F,0x000000000000509081d6FCD3ee63e791aD1db763,0x9996FCFa25B234e80BcF876d83d2e7F338F9BDA5,0xF5925E20e3F4002bA17130641A87f574c71A8B3c,0x78FE5B15685555EC0972272B826Cd8E7FF8790B2,0xD421895EC9FB4d6605246a9e8bab69A9419FFA1D,0x2935e24631E8F8Ed63E34f325AB967f09E9f7701,0x36C496cEA362dd5eE5d78E8B02Ba0Bb519c019dC)AND varbinary_substring(data, 1, 4) IN (0x77b6a6e5, 0xe5b67c23, 0xdc860770, 0xf34cfc0f, 0xdfb9cea7, 0xc8ce2ed2, 0x46ab7951, 0x3082d948, 0x7aaf1f4f)AND value > UINT256 '0'GROUP BY 1),official AS (SELECT month, SUM(cost_eth) AS ens_ethFROM (SELECT date_trunc('month', evt_block_time) AS month, cost / 1e18 AS cost_ethFROM ethereumnameservice_ethereum.ETHRegistrarController_evt_NameRegisteredUNION ALLSELECT date_trunc('month', evt_block_time) AS month, cost / 1e18 AS cost_ethFROM ethereumnameservice_ethereum.ETHRegistrarController_evt_NameRenewedUNION ALLSELECT date_trunc('month', evt_block_time) AS month, (baseCost + premium) / 1e18 AS cost_ethFROM ethereumnameservice_ethereum.ETHRegistrarController_v1_evt_NameRegisteredUNION ALLSELECT date_trunc('month', evt_block_time) AS month, cost / 1e18 AS cost_ethFROM ethereumnameservice_ethereum.ETHRegistrarController_v1_evt_NameRenewed) uGROUP BY 1)SELECTCOALESCE(v.month, o.month) AS month,COALESCE(v.vision_eth, 0) AS vision_eth,COALESCE(o.ens_eth, 0) AS ens_official_eth,CASEWHEN COALESCE(o.ens_eth, 0) = 0 THEN NULLELSE COALESCE(v.vision_eth, 0) / o.ens_ethEND AS vision_shareFROM vision vFULL OUTER JOIN official o ON v.month = o.monthWHERE COALESCE(v.month, o.month) >= TIMESTAMP '2022-05-01'ORDER BY 1