A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

summing duplicate data (--help a rookie please)



 
 
Thread Tools Display Modes
  #1  
Old March 21st, 2008, 12:23 AM posted to microsoft.public.access.queries
Dan
external usenet poster
 
Posts: 14
Default summing duplicate data (--help a rookie please)

Hello -

I have a table which looks like the following:

PLU ITEM DATE SOLD
12345 BALL 3/7/08 6
56789 ROPE 3/7/08 8
12345 BALL 3/14/08 2
12345 BALL 3/14/08 9
67900 GAME 3/14/08 4

I am trying to create a query which will summarize each week, plu,
sold; like this:

PLU ITEM DATE SOLD
12345 BALL 3/7/08 6
56789 ROPE 3/7/08 8
12345 BALL 3/14/08 11
67900 GAME 3/14/08 4

However, I can't figure out how to SUM the SOLD column when the DATE
is the same. The example above shows PLU 12345 on 3/14/08.

Any suggestions? Thanks!
Dan
  #2  
Old March 21st, 2008, 03:36 AM posted to microsoft.public.access.queries
MGFoster
external usenet poster
 
Posts: 653
Default summing duplicate data (--help a rookie please)

Dan wrote:
Hello -

I have a table which looks like the following:

PLU ITEM DATE SOLD
12345 BALL 3/7/08 6
56789 ROPE 3/7/08 8
12345 BALL 3/14/08 2
12345 BALL 3/14/08 9
67900 GAME 3/14/08 4

I am trying to create a query which will summarize each week, plu,
sold; like this:

PLU ITEM DATE SOLD
12345 BALL 3/7/08 6
56789 ROPE 3/7/08 8
12345 BALL 3/14/08 11
67900 GAME 3/14/08 4

However, I can't figure out how to SUM the SOLD column when the DATE
is the same. The example above shows PLU 12345 on 3/14/08.


SELECT PLU, Item, [date], Sum(Sold) As TotSold
FROM table_name
GROUP BY PLU, Item, [date]

--
MGFoster:::mgf00 at earthlink decimal-point net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:41 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.