where gos.eid in ( :eids ) and gos.id = gosp.net_element_id and
gos.id not in (select ealjs.element_id from aaaa ealjs where ealjs.groupid = :groupid)
If I run this it gives error for ":".If I remove : then I will get error like missing FROM-clause entry for table bbbb.
How are you executing the query, in what client program. If it is psql did you define the variable groupid and eids prior to running the provided query?
What is the issue here and what should be exact query in postgressql
PostgreSQL
You should provide the exact and complete psql script you are trying to run ... asking for help with an incomplete example won't get you far.