XQuery cheat sheet

if (test) then expression1 else expression2

for $x in e1 let $y := e2 order by e3, e3x when e4 return e5

concat("a","b") => "ab" distinct-values(("a","b","a")) => ("a","b")