HadisehTotal
Updated 2025-05-09Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
SELECT
COUNT(DISTINCT t.chain) AS chain_count,
COUNT(DISTINCT t.liquidity_pool) AS pool_count,
COUNT(DISTINCT t.transaction_id) AS swap_count,
COUNT(DISTINCT t.user_address) AS unique_users,
SUM(t.transaction_volume) AS total_transaction_volume
FROM
(SELECT
COALESCE(from_amount_usd, to_amount_usd) AS transaction_volume,
blockchain AS chain,
pool_name AS liquidity_pool,
tx_id AS transaction_id,
from_address AS user_address
FROM
thorchain.defi.fact_swaps
WHERE
block_timestamp::date >= '2024-01-01'
) AS t;
QueryRunArchived: QueryRun has been archived