cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USQL - Sorting appversion based on semantic versioning instead of number

benjamin_mullan
Visitor

I am trying to create a dashboard that surfaces USQL data showing the count of users by application version. a Appversion N-2 type deal.

In semantic versioning 7.19.x would be higher than 7.2.x however in math that's not the case so the order by function produces the below, the bold being the numbers id expect being at the top:


7.3.4

7.3.2

7.3.0

7.2.0

7.19.0

7.18.0

7.17.0

7.16.1


In SQL I believe we could use a split method then do order by str1,str2,str3 but USQL shows no such function on the documentation.

1 REPLY 1

David_Hauger
Newcomer

No, as this is a string it takes the lexicographic order.

However, you can add a custom property; e.g. with one longer string (e.g. with more numbers per part, "07.019.00",...), or 3 different longProperties as version numbers - then you can sort by those.

Extracting substrings and converting them to a number is currently not possible.