I am using Couchbase Server Version: 4.6.3-4136 Enterprise Edition (build-4136),
and my N1QL s following:
SELECT f.f1
FROM default f
WHERE f.f2 IN (SELECT RAW s.f3
FROM default s
LET k1 = (SELECT RAW l.ff FROM default USE KEYS "key1" ),
k2 = (SELECT RAW l.kk FROM default USE KEYS "key1" )
WHERE s.f4 IN k1 AND s.f5 == k2[0])
the error shows
[
{
"code": 5010,
"msg": "Error evaluating filter. - cause: FROM in correlated subquery must have USE KEYS clause: FROM default."
}
]
is there any other way to get the same result with the same logic?