table one:
field one field two
1 1-1
2 1-2
3 1-5
4 1-3
4 1-6
4 1-2
5 1-0
using the sql command to get the results as the following table.
field one field two
5 1-0
1 1-1
2 1-2
4 1-2
4 1-3
4 1-6
3 1-5
ps: the condition is selecting field two order by asc . but if the result have the same field one.then put the field two together. and asc them.
Haven’t checked the syntax but something along these lines should do it:
In essence: for each fieldOne find the lowest value in the group and use that as primary sortfield for all records in the group. Within the group sort on the actual value in fieldtwo
There are still potential issues left though: 1-10 will sort between 1-1 and 1-2
If you also want to resolve that you need to split up fieldtwo and convert to ints.
In all cases you might want to rethink if this datamodel is really setup the way you want/need