例如:
表是
date bill amount 12/06/2013 200 12/06/2013 920 15/06/2013 300
输出
date bill amount 12/06/2013 1120 15/06/2013 300
答案 0 :(得分:2)
SELECT date, SUM(billamount)
FROM tab1 GROUP BY date;
答案 1 :(得分:0)
使用 group by 来实现目标。
答案 2 :(得分:0)
SELECT theDate, COUNT(theDate) AS NumOccurrences
FROM someTable GROUP BY theDate
HAVING ( COUNT(theDate) > 1 )
答案 3 :(得分:0)