Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 194
  • Last Modified:

SQL Select Group By and Sum

Need to a sinmplke SQL Select that will group and sum some data.

Product Code       Product Line    Amount
1234                      Clothing            5.00
2333                      Clothing            2.00
5000                      Toys                  1.00

I need a SQL Select that will give me these results:

Product Line   Amount
Clothing           7.00
Toys                  1.00
0
hojohappy
Asked:
hojohappy
1 Solution
 
strivoliCommented:
select [product line], sum([Amount]) from table group by [product line]
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now