我有一个包含 2 列纬度和经度的表,并且想要 GROUP 精确匹配(仅) 2 列上的 串联值。
表行:
/* Points Table */
time |lat |long
113 |2.1 |5.8
114 |2.1 |5.6 -Set as Group
115 |2.1 |5.6 -Set as Group
116 |2.1 |5.6 -Set as Group
117 |2.1 |5.6 -Set as Group
118 |2.3 |5.2
119 |2.4 |5.3
120 |2.5 |5.3 -Set as Group
121 |2.5 |5.3 -Set as Group
122 |2.6 |5.3
123 |2.1 |5.6 -Set as Group
201 |2.1 |5.6 -Set as Group
202 |2.1 |5.6 -Set as Group
203 |2.5 |5.3
结果必须是:
/* Points Table */
time |lat |long
113 |2.1 |5.8
114 |2.1 |5.6 -Grouped as 1 with first tandem time
118 |2.3 |5.2
119 |2.4 |5.3
120 |2.5 |5.3 -Grouped as 1 with first tandem time
122 |2.6 |5.3
123 |2.1 |5.6 -Grouped as 1 with first tandem time
203 |2.5 |5.3
我只想对串联值进行分组,在上面我们有两个时间串联2.1 & 5.6
值,并且组被拆分。(用于测试可以在http://sqlfiddle.com/#!2/5d196上工作)。;)