COQL Query using multiple Lookup conditions causes SYNTAX_ERROR

COQL Query using multiple Lookup conditions causes SYNTAX_ERROR

Hi everyone,

I'm trying to build a COQL query that includes conditions on multiple lookup fields.
Each condition works perfectly on its own — and also the condition on the Payment_Date field works fine.
But when I try to combine two lookup conditions together, I get the following error:

  1. { "code": "SYNTAX_ERROR", "details": { "near": "where" }, "message": "error occured while parsing the query", "status": "error" }

This version works fine:

  1. select ... from Pyments
  2. where Link_to_Vendor.id is not null
  3. and Payment_Date between '2025-04-01' and '2025-04-30'

This also works:

  1. select ... from Pyments
  2. where Link_to_contact.id = 1234567890
  3. and Payment_Date between '2025-04-01' and '2025-04-30

But this version fails:

  1. select ... from Stipends
  2. where Link_to_contact.id = 1234567890
  3. and Payment_Date between '2025-04-01' and '2025-04-30
  4. and Link_to_Vendor.id is not null

Is there a known limitation when combining multiple lookup conditions in COQL?
Is there a workaround?

Thanks in advance!