我参照高手的有点类似的例子,做了如下查询,因数据量大一时测试不出此方法的对否,且对此处用last或first的区别模糊请高手就这两个问题指点。谢谢!
SELECT Last(表1.姓名) AS 姓名, Last(表1.单位) AS 单位, Last(表1.品名) AS 品名, Last(表1.编号) AS 编号, Last(表1.数量) AS 数量, Sum(表1.金额) AS 金额
FROM 表1
GROUP BY [业务员] & [票号]
HAVING (((Sum(表1.金额))<>0));