Im trying to query the array column in couchbase using UNNESt. But getting the below error.
Query:
SELECT * FROM
alertsUNNEST timestamps WHERE timestamps '2018-04-21T06:37:44.512Z' BETWEEN '2018-04-21T08:37:44.512Z'
Error messgae:
[
{
"code": 3000,
"msg": "syntax error - at '2018-04-21T06:37:44.512Z'",
"query_from_user": "SELECT * FROM `alerts` UNNEST timestamps WHERE timestamps '2018-04-21T06:37:44.512Z' BETWEEN '2018-04-21T08:37:44.512Z'"
}
]
Table content: SELECT * FROM 'alerts';
[
{
"alerts": {
"alertid": "3c217a81450278b38f3ad1a7260955d4",
"severity": 3,
"tally": 540,
"timestamps": [
"2018-04-21T07:37:44.512Z"
],
"type": "ALERTS"
}
}
]