SELECT trunc(block_timestamp, 'hour') as hr, sum(amount_usd) as total_amt_usd
, count(DISTINCT origin_address) as unique_minters, sum(total_amt_usd) over (order by hr) as cumulative_amt_usd,
sum(unique_minters) over (order by hr) as total_mints, cumulative_amt_usd/total_mints as cost_per_mint
from ethereum.udm_events
where
(ORIGIN_FUNCTION_SIGNATURE='0x0dfd025a' or origin_function_signature = '0x63a782f5' )and
to_address = lower('0x23581767a106ae21c074b2276D25e5C3e136a68b' )
-- and symbol = 'ETH'
group by 1
-- , 2 , 3
LIMIT 10