Query editor
WITH creator AS (SELECTdate_trunc('day', block_time) AS day,sum(bytearray_to_uint256(bytearray_substring(data, 1, 32))) / 1e18 AS creator_ethFROM robinhood.logsWHERE contract_address = 0xd3AFEB2a57f70eF218Aa82451c51B2fb0416Ac9eAND topic0 = 0x4e45da441832cf53bdaa69235704fc0575e68210f459ee1562911024b12967d5AND topic1 = 0x000000000000000000000000338a3b6b0eabc0efdd1aea33e81e57c102158d8cGROUP BY 1),eth_px AS (SELECT date_trunc('day', minute) AS day, avg(price) AS eth_usdFROM prices.usdWHERE blockchain = 'robinhood'AND contract_address = 0x0bd7d308f8e1639fab988df18a8011f41eacad73GROUP BY 1)SELECTc.day,c.creator_eth * p.eth_usd AS creator_usd,c.creator_eth / 0.35 * 0.30 * p.eth_usd AS protocol_usd,c.creator_eth / 0.35 * 0.35 * p.eth_usd AS buyback_usd,c.creator_eth / 0.35 * p.eth_usd AS total_revenue_usdFROM creator cINNER JOIN eth_px p ON p.day = c.dayORDER BY c.day