Hi
I have this query :
Select
Inv.ItemId As Item,
Sum(Inv.RowTotal) As TotSales,
Sum(Qty) as ItemQty,
(Select Sum(Qty) From Invoice) As TotQty
from Invoice Inv
Group by Inv.ItemId
It returns :
Item...... TotSales..... ItemQty...... TotQty
000001... 18510.00..... 39.00......... 90.00
000002... 28540.00..... 30.00 ........ 90.00
000003... 30790.00..... 21.00 ........ 90.00
I need to select the items when Sum(ItemQty) > = 60
In this case Item 1 and 2
Help
I have this query :
Select
Inv.ItemId As Item,
Sum(Inv.RowTotal) As TotSales,
Sum(Qty) as ItemQty,
(Select Sum(Qty) From Invoice) As TotQty
from Invoice Inv
Group by Inv.ItemId
It returns :
Item...... TotSales..... ItemQty...... TotQty
000001... 18510.00..... 39.00......... 90.00
000002... 28540.00..... 30.00 ........ 90.00
000003... 30790.00..... 21.00 ........ 90.00
I need to select the items when Sum(ItemQty) > = 60
In this case Item 1 and 2
Help