Either re-write your query (without using the sub selects), or create this statement as a view in the database.
select ... , (select ... from ... where ...) alias => sub select is not possible from ... where ...
how to create this statement as a view in the database ?
Just copy-paste your select statement. You probably want to make some modifications to the view. E.g. you might not want this fixed id in your statement:
create or replace view my_view as select ...
AND okl.ID = 130246066126590818122526020119476052469
and then in forms
create or replace force view blub as select a,b,c,d from your_table /
I guess studying a bit in the documentation wouldn't hurt;
cursor a is select a,b,c,d from blub;