How can I compare one field with another in NRQL?

166 Views Asked by At

How can I make this kind of query in NRQL?

SELECT origin, destination FROM locations WHERE origin = destination
1

There are 1 best solutions below

1
Seng Phrakonkham On BEST ANSWER

An option for this to use a subquery like this

SELECT origin, destination FROM locations WHERE origin IN (SELECT destination FROM locations)