Query editor
withsubmissions_poly AS (SELECTtx_hash,'polygon' AS blockchainFROMpolygon.logsWHEREtopic0 = 0xaffc45517195d6499808c643bd4a7b0ffeedf95bea5852840d7bfcf63f59e821),CCIP_costs AS (SELECTevt_tx_hash,submissions.blockchain,date_trunc('day', evt_block_time) AS "date",value-- COUNT(evt_tx_hash) as tx_count,-- SUM(value / 1e18) as amountFROM(SELECT * FROM erc20_polygon.evt_TransferRIGHT JOIN submissions_poly ON submissions_poly.tx_hash = evt_Transfer.evt_tx_hash) as txJOIN(SELECT * FROM submissions_poly) as submissions ON submissions.tx_hash = tx.evt_tx_hashWHEREevt_block_time >= CAST('2023-07-01' as TIMESTAMP)AND evt_block_time < CAST(NOW() as TIMESTAMP))select * from CCIP_costs