答案 0 :(得分:1)
Select membername From
(Select membername,
substring_index ( membername,',',1)+substring_index ( membername,',',-1) as total
From Table1) T1
Inner Join
(
Select Max(total) total1,Min(total) total2 From (
SELECT membername,
substring_index ( membername,',',1)+substring_index ( membername,',',-1) as total
From Table1)T) T2
ON T1.total=T2.total1
OR T1.total=T2.total2
现场演示
答案 1 :(得分:1)
要根据问题中的预期结果对表格进行排序,您只需要:
SELECT latlong
FROM someTable
ORDER BY latlong ASC