Skip to content
Dune Analytics

@devinwalsh / 0x Number Trades v2

Number of Trades on 0x0x Number Trades v2


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 results


SQL query

1WITH v21 AS
2  (SELECT evt_block_time AS evt_block_time21,
3          COUNT(*) AS trades21
4   FROM zeroex_v2."Exchange2.1_evt_Fill"
5   WHERE evt_block_time > now() - interval '1 year'
6   GROUP BY 1),
7     v3 AS
8  (SELECT evt_block_time AS evt_block_time3,
9          COUNT(*) AS trades3
10   FROM zeroex_v3."Exchange_evt_Fill"
11   WHERE evt_block_time > now() - interval '1 year'
12   GROUP BY 1),
13     v21_day AS
14  (SELECT date_trunc('day', evt_block_time21) AS DAY21,
15          sum(trades21) AS num_trade21
16   FROM v21
17   GROUP BY 1),
18     v3_day AS
19  (SELECT date_trunc('day', evt_block_time3) AS DAY3,
20          sum(trades3) AS num_trade3
21   FROM v3
22   GROUP BY 1),
23     all_numtrade AS
24  (SELECT *
25   FROM v21_day v21...