OK, that makes better sense. Please respond to the list (you should always try keep any list responses CC:ed to the list so that everyone else can help and learn from the exchange, too) with the information that Rhino requested and I am sure someone will be able to help you work out your query.
Thanks! Shawn Green Database Administrator Unimin Corporation - Spruce Pine "Andrew Kuebler" <[EMAIL PROTECTED]> wrote on 10/13/2004 11:53:27 AM: > Sorry, I said it wrong. I want the total purchased in an order and > the total charged for that order. I am only looking for totals at an > order level, not by customer. > Best Regards, > Andrew Kuebler > AK Communications, Inc. > Phone: (866) 925-2666 x123 / Fax: 866-925-3296 (Toll-free) > http://www.akcomm.com > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 13, 2004 11:37 AM > To: Andrew Kuebler > Cc: [EMAIL PROTECTED] > Subject: Re: SELECT SUM + 2 JOINS > > > I believe what you want needs two queries, one to total up on the > order# the other to total up by customer. I wouldn't recommend > trying to do it all at once as they are two different (but similarly > asked) questions. > > Shawn Green > Database Administrator > Unimin Corporation - Spruce Pine > > > "Andrew Kuebler" <[EMAIL PROTECTED]> wrote on 10/13/2004 11:22:37 AM: > > > I have a MySQL table with Order#'s (Primary Key). > > > > > > > > I want to total the number of items per order which I do through an inner > > join to the order contents, but then I want to also get a total on the > > amounts a customer has been billed to make sure there isn't a customer that > > has been shipped something they haven't paid for. Everything is ok until I > > do the left join on the payments which there could be more than one of for > > each order. Is it possible to do what I am asking in one query? > > > > > > > > I hope I have made sense. > > > > Best Regards, > > > > Andrew > > > > > >