我想按列“值”对表中的行进行排序,其中字段 =“订单”,按 ObjectId 对行进行分组:
Id | ObjectId | Field | Value
------------------------------
1 | 1 | size | big
2 | 1 | order | 2 //unsorted
3 | 2 | size | small
4 | 2 | order | 1 //unsorted
5 | 3 | size | medium
6 | 3 | order | 3 //unsorted
预期结果:
Id | ObjectId | Field | Value
------------------------------
3 | 2 | size | small
4 | 2 | order | 1 //sorted
1 | 1 | size | big
2 | 1 | order | 2 //sorted
5 | 3 | size | medium
6 | 3 | order | 3 //sorted