Sql Query Behind Sold Stock Between Dates (by Source)

Hi all


I am trying to access the sold data for our inventory over the past week in a script. I can see the the query type "Sold Stock Between Dates (by Source)" gives us the exact data we are after.


What is the SQL query that produces that report or where can we find the  "SoldQuantity" property for each item?


Thanks in advance


Seb

Hi Seb,


We are not sharing the code behind our reports. SoldQuantity is a sum of order item quantities SUM(orderitem.nqty). It only captures orders that have been processed.

Hi,

I need a script that will show both source and currency.  Currently, LW only has the 4 options in the screenshot below.  I need "Sold Stock Between Dates (by Source and Currency).  Can you add this, please?


Thanks!


Jen of CalmingBreath



I'm just getting to grips with Linnworks but would the sample code here not be the basis

http://www.linnworks.com/support/dashboards-sales-reporting/query-data/custom-script/further-sample-queries

The "Order Life History for Processed Orders Across A Date Range" would be modified so line:

SET @FromDate = GETDATE()-30

 becomes

SET @FromDate = GETDATE()-7


Let me know if that helps or if you need a hand writing the SQL.


Jon


Login to post a comment