Skip to content
Dune Analytics

@hagaetc / [Deprecated method] Number of traders last 7 days🏟

SQL query

1SELECT ROW_NUMBER () OVER (ORDER BY SUM("Traders") DESC) AS "Rank", "Project", SUM("Traders") AS "Number of Traders" FROM
2(
3
4    (SELECT COUNT(DISTINCT trader) AS "Traders", '0x' AS "Project" FROM
5   
6    (
7           (SELECT DISTINCT "takerAddress" AS trader, evt_tx_hash
8         FROM zeroex_v3."Exchange_evt_Fill"
9         WHERE evt_block_time > now() - interval '7 days')
10      UNION ALL 
11        (SELECT DISTINCT "makerAddress" AS trader, evt_tx_hash
12         FROM zeroex_v3."Exchange_evt_Fill"
13         WHERE evt_block_time > now() - interval '7 days')) e
14           
15         )
16
17UNION    
18
19    (SELECT COUNT(DISTINCT trader) AS "Traders", 'Kyber' AS "Project"
20    FROM kyber."Network_evt_KyberTrade" e
21    WHERE evt_block_time > now() - interval '7 days')
22    
23UNION ALL
24
25    (...

SQL query results

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

Loading