WITH hashes as (
SELECT DISTINCT TX_HASH as tx_hash
FROM aptos.core.fact_events
WHERE EVENT_TYPE = '0x7e783b349d3e89cf5931af376ebeadbfab855b3fa239b7ada8f5a92fbea6b387::event::PriceFeedUpdate'
)
SELECT sum(GAS_UNIT_PRICE * GAS_USED) / 10e7 as txs_fees
FROM aptos.core.fact_transactions t
JOIN hashes h ON t.tx_hash = h.tx_hash