Summarising data

From: Wes (wharrison_at_adcbarcode.com)
Date: 03/29/04


Date: Mon, 29 Mar 2004 05:26:55 -0800

I have a table of data storing the following fields

Stock_Code (varchar 10)
Location (varchar 10)
Quantity (int)

Sample data is as follows

Stock_Code Location Quantity
AD002 B1 200
AD002 B2 150
AD002 B3 350
AD003 B1 50
AD003 B2 80
AD003 B3 70

I would like a query that would return all rows from the
table but also subtotal the quantity of stock codes. i.e.
for each change in stock code i would receive a sub total
line displaying the total for that stock code (in this
example, AD002 = 700, AD003 = 200)

Any help would be greatly appreciated

Wes.