PLATFORM | TOTAL_LIQUIDITY | SEVEN_DAY_VOLUME | ONE_MONTH_VOLUME | TOTAL_VOLUME | MONTHLY_USER | POOL_ADDRESSES | |
---|---|---|---|---|---|---|---|
1 | uniswap-v3 | 344911.364827007 | 915619.92 | 5608150.22 | 116862825.04 | 57 | [
"0x7a233f0e957a9ff4726c738e9d790b9956f4c894"
] |
Sandeshdex liquidity pool MPH
Updated 2025-02-07
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
›
⌄
⌄
/*
Description:
This query analyzes token activity across Ethereum chain for karrat token.
It calculates liquidity, volume metrics, and identifies liquidity pools for each DEX platform.
The query uses Common Table Expressions (CTEs) to organize complex logic and improve readability.
Key features:
1. Volume calculations for different time periods (7-day, 1-month, total)
2. Liquidity pool identification and balance calculation
3. Platform-specific aggregations
All thanks to andrew hong for the query which this query is based on.
*/
-- DEX Pool Identification and Volume Calculation
WITH dex_pools AS (
SELECT
platform,
contract_address AS liquidity_pools,
SUM(CASE
WHEN (block_timestamp > current_timestamp - INTERVAL '7 days')
THEN COALESCE(amount_in_usd, amount_out_usd)
ELSE NULL
END) AS seven_day_volume,
SUM(CASE
WHEN (block_timestamp > current_timestamp - INTERVAL '1 month')
THEN COALESCE(amount_in_usd, amount_out_usd)
ELSE NULL
END) AS one_month_volume,
SUM(COALESCE(amount_in_usd, amount_out_usd)) AS total_volume,
count (distinct (CASE
WHEN (block_timestamp > current_timestamp - INTERVAL '1 month')
THEN COALESCE(sender, '')
Last run: 3 months ago
1
117B
24s