Hi Is it possible to do case statement in ArangoDB?

Sample Data:
{"x":1,"y":10}
{"x":4,"y":6

And I have the following conditions:

    0 <= x/y < 0.5 then "A"
    0.5 <= x/y < 0.75 then "B"
    0.75 <= x/y < 0.95 then "C"
    0.95 <= x/y then "D"

How to write AQL statement to produce the result:
[
  {"x": 1, "y": 10, "class": "A",
  {"x": 4, "y": 6,  "class": "B"}
]


Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to