bachiuni dex
Updated 2022-06-04
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
WITH uni_txn_dtls
AS (SELECT Date(block_timestamp) AS date,
Count(tx_id) AS num_of_txns,
Count(DISTINCT from_address) AS total_users,
Sum(fee_usd) AS total_fees
FROM ethereum.transactions
WHERE to_label = 'uniswap'
OR from_label = 'uniswap'
GROUP BY date),
other_dex_txn_dtls
AS (SELECT Date(block_timestamp) AS date,
Count(tx_id) AS num_of_txns,
Count(DISTINCT from_address) AS total_users,
Sum(fee_usd) AS total_fees
FROM ethereum.transactions
WHERE ( to_label_type = 'dex'
OR from_label_type = 'dex' )
AND to_label <> 'uniswap'
AND from_label <> 'uniswap'
--and date >= dateadd(month, -12, getdate())
GROUP BY date),
uni_active_users
AS (SELECT Date(block_timestamp) AS date,
Count(DISTINCT from_address) AS active_users
FROM ethereum.transactions
WHERE ( to_label = 'uniswap'
OR from_label = 'uniswap' )
AND from_address IN (SELECT from_address
FROM ethereum.transactions
WHERE ( to_label = 'uniswap'
OR from_label = 'uniswap' )
AND block_timestamp >=
Dateadd(day, -90, Getdate()))
GROUP BY date),
other_dex_active_users
AS (SELECT Date(block_timestamp) AS date,
Run a query to Download Data