Query editor
With breeds_per_day as (SELECT date_trunc('day', block_time) AS day, count(*) as new_unicornsFROM polygon.transactionsWHERE to = 0xdc0479cc5bba033b3e7de9f178607150b3abce1fAND SUBSTRING(data FROM 1 FOR 4) = 0xd2df3a9e --'0xdf3a9e'AND successand block_time > cast('2022-05-01' as timestamp)group by 1),egg_hatches as (SELECT date_trunc('day', block_time) AS day, count(*) as hatchesFROM polygon.logsWHERE topic0 = 0xad2365254d6e4d251c23b026751871e1debd9acb6b71c5503ced0950d116de8f--and contract_address = '\xdc0479cc5bba033b3e7de9f178607150b3abce1f'group by 1),unicorn_evolution as (SELECT date_trunc('day', block_time) AS day, count(*) as evolutionsFROM polygon.logsWHERE topic0 = 0x6226a43ab2cd2c3bb95fbcba22bbed53c8dfbe8b869d71894c83b2d43f24d21e--and contract_address = '\xdc0479cc5bba033b3e7de9f178607150b3abce1f'group by 1)Selectb.day as "Day",cast(b.day as date) as day_short,--b.new_unicorns as "New Unicorns Eggs/Day",--sum(b.new_unicorns) over (order by b.day) as "Total New Eggs",--h.hatches as "Hatches/Day",--sum(h.hatches) over (order by b.day) as "Total Hatches",--e.evolutions as "Evolutions/Day",--sum(e.evolutions) over (order by b.day) as "Total Evolutions",sum(b.new_unicorns) over (order by b.day) - sum(coalesce(h.hatches,0)) over (order by b.day) + 254 as "Total Eggs",sum(h.hatches) over (order by b.day) - sum(coalesce(e.evolutions,0)) over (order by b.day) as "Total Babies",sum(coalesce(e.evolutions,0)) over (order by b.day) + 9746 as "Total Adults"from breeds_per_day bleft join egg_hatches hon b.day = h.dayleft join unicorn_evolution eon b.day = e.day--group by 1,2,4,6order by 1 desc--6/13/2022--Of the 10,000 Genesis Unicorns--254 are eggs--9,746 as adults--order by 1 desc