anomoneUnion of DOGE swaps and Other swaps
Updated 2023-03-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 DISTINCT POOL_NAME FROM thorchain.daily_pool_stats
ORDER BY POOL_NAME
SELECT * FROM thorchain.daily_pool_stats
WHERE POOL_NAME like '%DOGE%'
ORDER BY DAY
SELECT *
from thorchain.daily_pool_stats
WHERE DAY >= DATEADD(day,-8, GETDATE())
AND POOL_NAME like '%DOGE%'
ORDER BY DAY
SELECT *
from thorchain.daily_pool_stats
WHERE DAY >= DATEADD(day,-2, GETDATE())
AND POOL_NAME like '%ETH%'
ORDER BY DAY
select POOL_NAME, DAY,
sum(SWAP_COUNT) as total_swap,
sum(SWAP_COUNT) / sum(sum(SWAP_COUNT)) over () * 100 as percent_swap
from thorchain.daily_pool_stats
WHERE DAY >= DATEADD(day,-2, GETDATE())
group by POOL_NAME, DAY
ORDER BY percent_swap desc
--this gives doge swaps by day from swaps table
select DAY,
sum(case when POOL_NAME like '%DOGE%' then SWAP_COUNT else 0 end) as Doge_swap,
sum(SWAP_COUNT) as Total_swap,
100 * sum(case when POOL_NAME like '%DOGE%' then SWAP_COUNT else 0 end) / sum(SWAP_COUNT) as PERCENT_swap
from thorchain.daily_pool_stats
WHERE DAY >= DATEADD(day,-8, GETDATE())
group by DAY
Run a query to Download Data