FlorentGLP actions
Updated 2024-01-19
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
›
⌄
WITH deposit_lp as (
SELECT
date_trunc('day', BLOCK_TIMESTAMP) as day,
sum(event_data ['deposit_amount']) / 1000000 as lp_deposit
FROM
aptos.core.fact_events
WHERE
event_type = '0x5ae6789dd2fec1a9ec9cccfb3acaf12e93d432f0a3a42c92fe1a9d490b7bbc06::house_lp::DepositEvent'
AND BLOCK_TIMESTAMP :: DATE >= '2023-10-01'
GROUP BY
1
),
withdraw_lp as (
SELECT
date_trunc('day', BLOCK_TIMESTAMP) as day,
sum(event_data ['withdraw_amount']) / 1000000 as lp_withdraw
FROM
aptos.core.fact_events
WHERE
event_type = '0x5ae6789dd2fec1a9ec9cccfb3acaf12e93d432f0a3a42c92fe1a9d490b7bbc06::house_lp::WithdrawEvent'
AND BLOCK_TIMESTAMP :: DATE >= '2023-10-01'
GROUP BY
1
)
SELECT
i.day,
lp_deposit,
lp_withdraw
FROM
deposit_lp as i JOIN withdraw_lp w ON i.day = w.day
ORDER BY 1 desc
SELECT
TX_HASH,
date_trunc('day', BLOCK_TIMESTAMP) as day,
QueryRunArchived: QueryRun has been archived