我有下表,想写一个SQL语句来总结每篇文章和Extract Maximum? :
| A | 3 | | B | 6 | | A | 4 |
输出:A = 7,B = 6.
答案 0 :(得分:1)
select columnname,sum(columnname),max(expression/columnname)
from tablename
group by columnname
答案 1 :(得分:0)
像这样;
SELECT Article, SUM(Num_Column)
FROM Table_Name
GROUP BY Article
ORDER BY Article