SELECT DATE_TRUNC('day' , block_timestamp) AS day,FEE_USD, SUM(fee_usd) OVER (PARTITION BY DATE_TRUNC('day' , block_timestamp) ORDER BY fee_usd )
AS ordered_gas_fee_in_august
FROM ethereum.transactions
WHERE BLOCK_TIMESTAMP::DATE BETWEEN '2022-08-01' AND '2022-08-31'