How to use "WHERE" and also "WHERE NOT EXISTS" in the same query and table?
WHERE is a separator, not an operation , the bit after WHERE describes the rows you want to see in the result.

To apply two conditons use AND or OR to combine them.

select * from t1 
where not exists (select * from t2 inner join t3 on(t3._id = t2.department_id)
  AND  t2.category_id = t1._id AND t3._id = 27 AND t3.company_id = 1) 
ORDER BY "ctsName"