i_danAvax VS Base: 2024 Total Metrics
Updated 2024-11-27
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
›
⌄
SELECT
blockchain AS "Blockchain"
, COUNT(DISTINCT tx_hash) AS "Transactions"
, SUM(amount) AS "Volume"
, COUNT(DISTINCT origin_from_address) AS "Traders"
FROM (
SELECT
'Base' AS blockchain
, tx_hash
, CASE WHEN amount_in_usd IS NOT NULL AND amount_out_usd IS NOT NULL THEN ((amount_in_usd+amount_out_usd)/2)
WHEN amount_in_usd IS NULL AND amount_out_usd IS NULL THEN NULL
WHEN amount_in_usd IS NULL AND amount_out_usd IS NOT NULL THEN amount_out_usd
WHEN amount_in_usd IS NOT NULL AND amount_out_usd IS NULL THEN amount_in_usd
ELSE NULL END AS amount
, origin_from_address
FROM base.defi.ez_dex_swaps
WHERE year(block_timestamp) = '2024'
AND amount IS NOT NULL
)
GROUP BY 1
UNION ALL
SELECT
blockchain AS "Blockchain"
, COUNT(DISTINCT tx_hash) AS "Transactions"
, SUM(amount) AS "Volume"
, COUNT(DISTINCT origin_from_address) AS "Traders"
FROM (
SELECT
'Avalanche' AS blockchain
, tx_hash
, CASE WHEN amount_in_usd IS NOT NULL AND amount_out_usd IS NOT NULL THEN ((amount_in_usd+amount_out_usd)/2)
QueryRunArchived: QueryRun has been archived