I have a TABLE
like this:
id | expected | current
------+----------+--------
123 | 25 | 15
234 | 26 | 26
345 | 37 | 37
Now I want to select all ids
where current
is equal to expected
. In SQL I would do something like this:
SELECT id FROM myTable WHERE current = expected;
But in CQL it seems to be invalid. My cqlsh
returns this:
no viable alternative at input 'current'
Is there a valid CQL query to achieve this ?
Edited According to the CQL-Docs it should work but it doesn't... This is what the doc says:
<selectWhereClause> ::= <relation> ( "AND" <relation> )*
| <term> "IN" "(" <term> ( "," <term> )* ")"
<relation> ::= <term> <relationOperator> <term>
<relationOperator> ::= "=" | "<" | ">" | "<=" | ">="
<term> ::= "KEY"
| <identifier>
| <stringLiteral>
| <integer>
| <float>
| <uuid>
;