Viewing 5 posts - 1 through 5 (of 5 total)
rbarryyoung (11/28/2008)
Did you try mine?
Yes, but under Percent of sales I got whole numbers. From looking at your code it seems like you were counting the rows. I tried that...
November 28, 2008 at 11:31 pm
Jack Corbett (11/28/2008)
;With cteItemTotalSales As
(
Select
IP.ItemNumberSK,
Sum(SI.Qty) as total_sold
From
item_purchase IP Join
sales_item SI On
IP.ItemNumberSK = SI.ItemNumberSK
Group By
IP.ItemNumberSK
)
SELECT
st.StoreName,
st.StoreCountry,
si.ItemNumberSK,
si.ItemName,
(SUM(si.Qty)/Convert(Float, total_sold)) as sales_pct
FROM
STORE st Join
ITEM_PURCHASE ip On
st.StoreNumberSK...
November 28, 2008 at 9:53 pm
GilaMonster (11/9/2008)
Access or SQL Server?Can you post the table definitions, an example of the data that would be inserted and the end results that you want?
I am using an Access...
November 9, 2008 at 12:41 pm
Thanks, but I am still lost.
My app is the only app toching ITEM_PURCHASE. I am new to this so... I am wondering could you guide me a little bit more....
November 9, 2008 at 12:05 pm
Thanks I am new to this so I dont know where to start..could you be able to help me with that?
November 9, 2008 at 11:44 am
Viewing 5 posts - 1 through 5 (of 5 total)