Skip to content
Advertisement

Xquery Get Consecutive Distinct Values

Trying to get consecutive distinct from the following XML.

Expected Result :

Current Result :

Code :

The distinct-values get distinct from the whole set, but I would like to get distinct values only if there are consecutive.

Advertisement

Answer

We have a pure XQuery solution.

SQL

Output

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement