Query editor
WITH daily AS (selectdate_trunc('day', block_time) as day,SUM(gas_price * gas_used/1e18) AS daily_gas_fees,COUNT(*) as daily_transactions,COUNT(distinct "from") as daily_unique_addresses,-- not working as of nowSUM(CASEWHEN "from" = 0x2222222222222222222222222222222222222222 THEN value/1e18ELSE 0END) AS daily_inflowsfrom hyperevm.transactions-- where success=truegroup by 1),-- not working as for nowdaily_outflows AS (selectdate_trunc('day', block_time) as day,-1*SUM(varbinary_to_uint256(data)/1e18) as daily_outflowsFROM hyperevm.logswhere "contract_address"=0x2222222222222222222222222222222222222222 and topic0 = 0x88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874group by 1),daily_base AS (selectd.day,d.daily_gas_fees,SUM(coalesce(d.daily_gas_fees, 0)) OVER (ORDER BY d.day) AS cumulative_gas_fees,SUM(coalesce(d.daily_gas_fees, 0)) OVER () AS total_gas_fees,((SUM(coalesce(d.daily_gas_fees, 0)) OVER ())/(1E9))*100 as percentage_of_supply_burned,d.daily_transactions,SUM(coalesce(d.daily_transactions, 0)) OVER (ORDER BY d.day) AS cumulative_transactions,SUM(coalesce(d.daily_transactions, 0)) OVER () AS total_transactions,d.daily_inflows as daily_inflows,ot.daily_outflows as daily_outflows,d.daily_inflows+ot.daily_outflows AS daily_netflows,SUM(coalesce(d.daily_inflows, 0) + coalesce(ot.daily_outflows, 0)) OVER (ORDER BY d.day) AS cumulative_netflows,SUM(coalesce(d.daily_inflows, 0) + coalesce(ot.daily_outflows, 0)) OVER () AS total_netflows,((SUM(coalesce(d.daily_inflows, 0) + coalesce(ot.daily_outflows, 0)) OVER ())/1E9)*100 AS percentage_of_hype_on_evm,-- temporary solution-- (SELECT value-- FROM UNNEST(map_entries(CAST(json_extract(json_parse(http_get('https://api.hypurrscan.io/holdersWithLimit/HYPE/1000')), '$.holders') AS map(varchar, double)))) AS t(key, value)-- where key = '0x2222222222222222222222222222222222222222'-- ) as total_netflows,d.daily_unique_addresses,-- SUM(coalesce(d.daily_unique_addresses, 0)) OVER (ORDER BY d.day) AS cumulative_addresses,(SELECT COUNT(DISTINCT "from") from hyperevm.transactions) AS total_addressesfrom daily d