Ethereum L2 Solutions - Gas Fee Comparison

    This SQL query calculates the total gas fees spent on transactions in two different Ethereum layer 2´s (Optimism and Arbitrum) over the past 31 days. It also calculates the equivalent USD value of those fees based on the average price of WETH during each day. Finally, it calculates the average USD value per transaction and computes the L1 security fees paid that pays for the cost of publishing the transaction on L1 from L2. The results are ordered by date and displayed in a table with columns for layer 2 name, date, total gas fees, total USD value, and average USD value per transaction.