Skip to content
Dune Analytics

@phabc / % of TXs predicting gas_used

SQL query

1WITH all_transactions AS(
2    SELECT 
3        date_trunc('week', t."block_time") AS time,
4        COUNT(t) as n
5    FROM ethereum.transactions t
6    WHERE t.block_number >= 7000000
7    GROUP BY 1
8),
9equal_transactions AS(
10    SELECT 
11        date_trunc('week', t."block_time") AS time,
12        COUNT(t) as n
13    FROM ethereum.transactions t
14    WHERE t.block_number >= 7000000
15    AND t.gas_used=t.gas_limit
16    GROUP BY 1
17)
18SELECT equal_transactions.time as time,
19       CAST(equal_transactions.n as decimal(38,6)) / all_transactions.n  as pourcentage
20FROM equal_transactions, all_transactions
21    
22

SQL query results

Loading