Query editor
withraw_traces as (selectdate_trunc('hour', block_time) as block_hour,100000000 as amt,tx_hash-- gas_used / 1e18 * gas_price as gasfrompolygon.traces-- https://polygonscan.com/tx/0x32268efc55fa082d90b5a9c968e97c42678f365f5ec2f8d29fbc3c36171c2a75-- data:,{"p":"prc-20","op":"deploy","tick":"pols","max":"2100000000000000","lim":"100000000"}-- data:,{"p":"prc-20","op":"mint","tick":"pols","amt":"100000000"}whereblock_date >= date '2023-08-12'and block_number >= 46203695and success = trueand from_utf8(input) = 'data:,{"p":"prc-20","op":"mint","tick":"pols","amt":"100000000"}'order byblock_number,tx_indexlimit21000000),raw_tx as (selectdate_trunc('hour', block_time) as block_hour,gas_used / 1e18 * gas_price as gasfrompolygon.transactionswhereblock_date >= date '2023-08-12'and block_number >= 46203695and (select distincttx_hashfromraw_traces) = hash)selectraw_traces.block_hour,sum(amt) as minted_amt,sum(gas) as minted_gas,sum(sum(amt)) over (order byraw_traces.block_hour) as total_minted_amt,sum(sum(gas)) over (order byraw_traces.block_hour) as total_minted_gas,cast(sum(sum(amt)) over (order byraw_traces.block_hour) as double) / 21000000000000 as minted_perfromraw_tracesinner join raw_tx on raw_traces.block_hour = raw_tx.block_hour