zakkisyedThorchain remove liquidity over time
Updated 2021-12-18
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
›
⌄
WITH add_liquidity
as
(SELECT block_timestamp as add_timestamp, from_address
FROM thorchain.liquidity_actions
WHERE
lp_action = 'add_liquidity'),
remove_liquidity as
(SELECT block_timestamp as remove_timestamp, from_address FROM thorchain.liquidity_actions
WHERE
lp_action = 'remove_liquidity')
SELECT
count(DISTINCT a.from_address) as add_liquidity_count,
count(DISTINCT r.from_address) as remove_liquidity_count,
date_trunc('day', r.remove_timestamp)
FROM
add_liquidity a,
remove_liquidity r
group by 3
order by 3 desc
Run a query to Download Data