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