Using SUM in query

  • Thread starter Thread starter Tor Inge Rislaa
  • Start date Start date
T

Tor Inge Rislaa

I want to create a query that can present the result of the table content
below as:
One row pr distinct type and the sum of every value pr type (With result
header as Type, SumValuePrType)

Type Value
1 1
1 2
1 3,5
2 3
2 2
2 1,7
3 3
3 1,43
2 4


TIRislaa
 
SELECT Type, Sum([Value]) As SumValuePrType
FROM MyTable
GROUP BY Type

--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top