Re: Repeating Results in Query

2002-10-31 Thread Michael Stearne
Ahh, thanks. Arthur Fuller wrote: GROUP BY Left(sku,5) hth, Arthur -Original Message- From: Michael Stearne [mailto:mstearne@;entermix.com] Sent: Thursday, October 31, 2002 11:31 AM To: [EMAIL PROTECTED] Subject: Repeating Results in Query The query below: SELECT DISTINCT LEFT(sku

RE: Repeating Results in Query

2002-10-31 Thread Arthur Fuller
GROUP BY Left(sku,5) hth, Arthur -Original Message- From: Michael Stearne [mailto:mstearne@;entermix.com] Sent: Thursday, October 31, 2002 11:31 AM To: [EMAIL PROTECTED] Subject: Repeating Results in Query The query below: SELECT DISTINCT LEFT(sku,5) AS Item_Sku,count(*) as

Repeating Results in Query

2002-10-31 Thread Michael Stearne
The query below: SELECT DISTINCT LEFT(sku,5) AS Item_Sku,count(*) as Quantity_Sold, SUM(price) AS Total_Sales FROM `orderline` WHERE (order_date>='20021030' AND order_date<='20021031') GROUP BY sku ORDER BY Item_Sku ASC Produces results like: Item_Sku Quantity_Sold Total_Sales LE104 1 18