At 18:51 9.7.2006, you wrote:
Hi,

I have the following Query and Im a lil lost on this one....

SELECT DISTINCT tbe_orders.order_id, tbe_orders.order_date,
tbe_orders.order_piececount
FROM tbe_orders


SELECT tbe_orders.order_id, tbe_orders.order_date, sum(tbe_orders.order_piececount)
FROM tbe_orders
GROUP BY tbe_orders.order_id

or

SELECT tbe_orders.order_id, tbe_orders.order_date, sum(tbe_orders.order_piececount)
FROM tbe_orders
GROUP BY tbe_orders.order_id, tbe_orders.order_date


depending whether date matters or not.



Regards, Dundo.



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to