How to combine near same item by SQL?

后端 未结 6 686
既然无缘
既然无缘 2021-02-11 10:53

I have some data in database:

id user 
1 zhangsan 
2 zhangsan 
3 zhangsan 
4 lisi 
5 lisi 
6 lisi 
7 zhangsan 
8 zhangsan 

I want keep order, a

6条回答
  •  说谎
    说谎 (楼主)
    2021-02-11 11:40

    You cannot do this in sql without doing some sort of sequential (iterative) analysis. Remember sql is set operation language.

提交回复
热议问题