SELECT SUM(Amount), AgentCode FROM Agent
GROUP BY AgentCode
Table structure(screenshot below)
without count in group by(use group by and select, same column)
SELECT Amount from Agent GROUP BY Amount
Reference:- https://www.w3resource.com/sql/aggregate-functions/sum-with-group-by.php
No comments:
Post a Comment