m26a
m26a

Reputation: 1413

How can I compare one field with another in NRQL?

How can I make this kind of query in NRQL?

SELECT origin, destination FROM locations WHERE origin = destination

Upvotes: 1

Views: 430

Answers (1)

Seng Phrakonkham
Seng Phrakonkham

Reputation: 193

An option for this to use a subquery like this

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

Upvotes: 0

Related Questions