Skip to content
Dune Analytics

@hagaetc / Number of traders last 7 days🏟

SQL query

1WITH traders AS (
2
3  SELECT project, trader_a AS trader
4  FROM dex."trades"
5  WHERE block_time > now() - interval '7 days'
6  
7  UNION 
8  
9  SELECT project, trader_b AS trader
10  FROM dex."trades"
11  WHERE block_time > now() - interval '7 days'
12  
13)
14
15SELECT ROW_NUMBER () OVER (ORDER BY SUM(traders) DESC) AS "Rank", project AS "Project", SUM(traders) AS "Number of Traders" FROM
16(
17  SELECT project, COUNT(distinct trader) AS traders
18  FROM traders
19  GROUP BY 1
20) users
21GROUP BY 2
22ORDER BY 1 asc;
23

SQL query results

Count of unique addresses that traded, maker and taker, trailing last 7 days.

Loading