I have a column in my mysql table something like this:
appVersion
5.16.0.2889 5.16.0.2893 5.14.0 5.14.0.3 5.12.0.1 5.15.0.14 5.1.0.2 5.12.0.3
I want to get the distinct latest versions of this column segregated on the basis of the first two numbers (a.b.c.d then only consider a.b as a single version)
like here we have let’s say the 3 distinct latest versions would be:
5.16.0.2893
5.16.0.2889
5.15.0.14
5.14.0.3
5.14.0
can someone please suggest mysql query for this?
definition of latest: let’s say if we have
5.14.0.9
5.12.0.4
6.1.0.2
5.14.0.12
5.16.1.2
5.12.1.1
distinct latest 3 would be
6.1.0.2
5.16.1.2
5.14.0.12
5.14.0.9