Skip to content
Dune Analytics

@kroeger0x / Fork of (#1275) DEX by volume last 24 hours

Market share 🍰Fork of (#1275) DEX by volume 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

1SELECT ROW_NUMBER () OVER (ORDER BY SUM(volume) DESC) AS "Rank", "Project", SUM(dexs.volume) AS "Volume" FROM  
2 
3(
4
5WITH prices AS (
6   (
7   SELECT minute, contract_address, symbol, price FROM prices.usd WHERE minute > now() - interval '1 days'
8    )
9),
10
11tokens AS(
12
13SELECT * FROM erc20.tokens 
14
15)
16
17(SELECT 'Uniswap' AS "Project",
18       SUM(eth/1e18 * p.price) AS volume
19FROM (
20        (SELECT evt_block_time,
21                eth_sold AS eth
22         FROM uniswap."Exchange_evt_TokenPurchase" WHERE evt_block_time > now() - interval '1 days')
23      UNION ALL
24        (SELECT evt_block_time,
25                eth_bought AS eth...

SQL query results

Loading