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 
> 
> 
> 

Reply via email to