What’s the problem? Say you have a version number such as 1.2.3 stored in a MySql database as a varchar, and you want to sort this version number. Without any decimals, here is the sorting descending:
+———+
| version |
+———+
| 9960 |
| 9952 |
| 9765 |
| 9764 [...]