Skip to content
Dune Analytics

@kroeger0x / Cost of an ETH Transfer, by hour, last 24 hours

Cost of an ETH Transfer, by hour, last 24 hours

Loading
 

About queries and results

Dune Analytics lets you explore, create, and share Ethereum analytics. You can find an endless amount of great queries and dashboards on Dune.

We have decoded Ethereum smart contract data so you can do powerful analysis with simple SQL queries and visualise the query results into beautiful graphs.

Dune Analytics is free for everyone forever. If you want extra features like private queries, export your results and more check out our Pro plan.

SQL query

1WITH
2    gas_prices AS (
3        SELECT
4            DATE_TRUNC('hour',block_time) AS time
5            , (PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY gas_price))  AS median_gas_price
6        FROM ethereum.transactions
7        WHERE
8            block_time >= (DATE_TRUNC('hour',CURRENT_TIMESTAMP) - '1 days'::INTERVAL)
9        GROUP BY 1
10        ORDER BY 1
11    )
12    , eth_usd_prices AS (
13        SELECT DISTINCT
14            DATE_TRUNC('hour',minute) AS time
15            , LAST_VALUE(price)
16                OVER
17                (
18                    PARTITION BY DATE_TRUNC('hour',minute)
19                    ORDER BY minute
20                    ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
21                ) AS price
22        FROM prices.layer1_usd_eth
23        WHERE
24            -- make sure this covers the whole time period
25            minute >= (DATE_TRUNC('hour',CURRENT_TIMESTAMP) - '1 days'::INTERVAL)...

SQL query results

Loading