Hi all, i am new here and i am learning the programming but i am very new so please bear with me and i do hope some kind soul can help me with my troubles.
I am looking for a metric widget to show a number of products in my data that need building.
What i am looking for is to grab the SKU of the product + the qty ordered and show the total sum/value for example we could have 2 orders for the same SKU but one order can have 1x SKU and the other order could have 2x SKU so total orders are 2 but i need it to show the 3 as it needs to take the qty ordered into consideration, which gives me the amount of orders but not the total qty over those orders:-
Currentlly the query is as follows:
SELECT count(*) as Total from orders where
OrderStatus IN ( 'PendingWaitingAllStock','PendingWaitingPartStock') and
OrderLines.Product.SKU IN ('4151596')
I need to get the column: "OrderLines.QuantityOrdered" into the metric as that can be more than 1 as explained above.
So i need to take "OrderLines.Product.SKU" and times/multiply "OrderLines.QuantityOrdered" to give me the total count.
I hope i have explained myself enough its hard as im learning and very new to this so hard to ask the question in tech terms
Thanks in advance