Skip to content
Dune Analytics

@Brecht / New Query

SQL query

1WITH loopring_transactions AS(
2SELECT call_tx_hash as tx_hash
3FROM loopring."ExchangeV3_call_commitBlock"
4UNION
5SELECT call_tx_hash as tx_hash
6FROM loopring."ExchangeV3_call_verifyBlocks"
7)
8SELECT date_trunc('day', tx.block_time),
9       sum((tx.gas_price*r.gas_used)/1e18) as total_tx_fees
10FROM loopring_transactions b
11LEFT JOIN ethereum.transactions tx ON tx.hash = b.tx_hash
12LEFT JOIN ethereum.receipts r ON tx."hash" = r.tx_hash
13GROUP BY 1
14ORDER BY 1;

SQL query results

Loading