hmxinternUnrealized PnL
Updated 2024-05-19
999
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 config as (
select
timestamp '2024-04-25 00:01' as start_time,
timestamp '2024-05-08 23:59' as end_time
),
account_connection as (
select
distinct *
from
(
select
DECODED_LOG ['primaryAccount'] as account,
DECODED_LOG ['subAccount'] as subAccount
from
blast.core.fact_decoded_event_logs
where
CONTRACT_ADDRESS = lower('0x0a8D9c0A4a039dDe3Cb825fF4c2f063f8B54313A')
and EVENT_NAME = 'LogIncreasePosition'
)
),
first_appearance_in_comp as (
select
distinct primaryAccount,
subAccountId,
marketIndex,
first_value(evt_block_time) over (
partition by primaryAccount,
subAccountId,
marketIndex
order by
evt_block_time asc
) as first_valid_open,
first_value(evt_tx_hash) over (
partition by primaryAccount,
subAccountId,
marketIndex
QueryRunArchived: QueryRun has been archived