SELECT * FROM user WHERE Uid IN ( select min(Uid) from user group by Sid )
sql查询不重复数据
原文:https://www.cnblogs.com/gjack/p/10326651.html