SocioCryptoDaily amount of stake to unstake over time
Updated 2022-06-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
›
⌄
SELECT a.date,
a.amnt as stake_amnt,
b.amnt as unstake_amnt
FROM(
SELECT date_trunc('day',block_timestamp) as date,
sum(amount) as amnt
FROM ethereum.core.ez_token_transfers
WHERE contract_address = '0xae7ab96520de3a18e5e111b5eaab095312d7fe84'
AND amount_usd > 0
and from_address = '0x0000000000000000000000000000000000000000'
GROUP BY date) a
LEFT JOIN (SELECT date_trunc('day',block_timestamp) as date,
sum(CASE WHEN amount_in_usd is null THEN amount_in/pow(10,18) ELSE amount_in end) as amnt
FROM ethereum.core.ez_dex_swaps
WHERE pool_name IN ('stETH-WETH SLP', 'stETH-WETH LP')
AND token_in = '0xae7ab96520de3a18e5e111b5eaab095312d7fe84'
AND origin_from_address IN (
SELECT to_address
FROM ethereum.core.ez_token_transfers
WHERE contract_address = '0xae7ab96520de3a18e5e111b5eaab095312d7fe84'
AND amount_usd > 0
and from_address = '0x0000000000000000000000000000000000000000')
GROUP BY date) b
ON a.date = b.date
Run a query to Download Data