David McInnis wrote:

>>select tax from orders, orderdetail where orders.id =
>>orderdetail.orderid and (productid = 1 or productid = 2 or productid =
>>3) 
>>
>>I can get multiple tax amounts where an order has multiple matching
>>records in orderdetail.  I know that I can group by order.id, but what I
>>eventually need to do is pull sum(tax) and not just tax.
>>  
>>
>  
>
Post the basic schema for the database tables in question and it would 
help.  It doesn't sound like you need a subselect, but that may just be 
a misinterpretation.

PS, I'd like some stats from the mysql list admins as to how many messages a day are 
blocked because of the requirement to include SQL or QUERY in the message and how many 
of those are _actually_ spam ... just watch for one day ...

-- 
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to