Query editor
with addresses as (select distinct(address) as addressfrom megaeth.creation_traces), tx_hashes as (selectcall_tx_hashfrom kumbaya_megaeth.swap_router_call_multicallunion allselectcall_tx_hashfrom kumbaya_megaeth.universal_router_call_execute), daily_user_activity as (selectt.block_date, t."from" as user_address, COUNT(*) as user_txfrom megaeth.transactions tinner join tx_hashes th on t.hash = th.call_tx_hashleft join addresses a on t."from" = a.addresswhere t."from" is not nulland a.address is nulland t.success = truegroup byt.block_date, t."from"), ranked_users as (selectblock_date, user_address, user_tx, SUM(user_tx) over (partition byblock_date) as daily_transactions, SUM(user_tx) over (partition byblock_dateorder byuser_tx desc rows unbounded preceding) as cumulative_txfrom daily_user_activity), daily_power_users as (selectblock_date, COUNT(*) FILTER(where cumulative_tx * 100.0 / daily_transactions <= 70) as power_users_count, COUNT(distinct user_address) as total_users, MAX(daily_transactions) as daily_transactionsfrom ranked_usersgroup byblock_date)selectblock_date