nitsHarmony Top Pool Daily Volume
Updated 2022-04-09
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
›
⌄
SELECT *, case when token0 = '0x3c2b8be99c50593081eaa2a724f0b8285f5aba8f' then '1'
when token0 = '0x985458e523db3d53125813ed68c274899e9dfab4' then '1'
when token0 = '0x3095c7557bcb296ccc6e363de01b760ba031f2d9' then '44000'
when token0 = '0x6983d1e6def3690c4d616b13597a09e6193ea013' then '3400'
when token0 = '0x0767d8e1b05efa8d6a301a65b324b6b66a1cc14c' then '35'
end as price , price*net_amt_in as liqudity_usd , price*cumulative_liquidity as cumulative_liquidiyu_usd
from
(SELECT * from
(SELECT day, pool_address as pa , sum(amount_usd)/pow(10,18) as net_amt_in, sum(net_amt_in) over(partition by pool_address order by day) as cumulative_liquidity from
(SELECT date(block_timestamp) as day, pool_address, case when amount0In ='0' then amount0out*(-1) else amount0in end as amount_usd
from mdao_harmony.swaps
where pool_address in ('0x39be7c95276954a6f7070f9baa38db2123691ed0','0xeb049f1ed546f8efc3ad57f6c7d22f081ccc7375','0x29fc6e830ca8586a68dff325f6d2349fb58be951',
'0xbf255d8c30dbab84ea42110ea7dc870f01c0013a', '0x02f4d0021e3cb8736108e11c8df02fbbd6eeedbf', '0xc5b8129b411ef5f5be22e74de6fe86c3b69e641d', '0x2c7862b408bb3dbff277110ffde1b4eaa45c692a',
'0x0c51171b913db10ade3fd625548e69c9c63afb96','0xc3670b927ef42eed252e483e2446352c238d9905', '0x9eee8923c021c6d40e8643b1abc2ec316602cecc'))
GROUP by 1,2 )
inner join mdao_harmony.liquidity_pools
on pa = pool_address)
-- 0x0767d8e1b05efa8d6a301a65b324b6b66a1cc14c
Run a query to Download Data