有来两条数据 几十个字段
现在需求 把姓名字段相同的 数量字段相加 其它字段保留其中1条的值
access语法 应该怎么写
access数据库没用过,经常用的是sql server和oracle,这里我只给出sqlserver的语句:
select name,SUM(score) score,(select top 1 other from test3 t2
where t1.name=t2.name) other from test3 t1 group by name
其中score是int类型的字段,name和other是nchar类型,other代表其他的字段,供你参考
如果可以,请采纳,谢谢。
https://zhidao.baidu.com/question/1819952905688977068.html
access示例