Flipside Teamrelocks
Updated 2024-07-08
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 t1 as (select
ACCOUNT_ADDRESS as user,
OLAS_AMOUNT as unlock_amount,
UNLOCK_TIMESTAMP as unlock_date
from crosschain.olas.ez_olas_locking
where EVENT_NAME = 'Deposit'
),
t2 as (select
ACCOUNT_ADDRESS as user,
OLAS_AMOUNT as lock_amount,
BLOCK_TIMESTAMP as lock_date
from crosschain.olas.ez_olas_locking
where EVENT_NAME = 'Deposit'
),
t3 as (select
user,
count(*) as locks
from t2
group by 1
),
t4 as (select
t2.user,
from t2
left join t1 on t1.user = t2.user
where t2.lock_date > t1.unlock_date
)
select
'relock' as action,
QueryRunArchived: QueryRun has been archived