on 09-20-2017 7:35 AM
Good Morning
I am wanting to create a query to see the effienciency of our sales office. I would like to create a query that shows number of orders processed per owner on a specific date range - is this possible?
many thanks,
Please check with below queries
For detail report
SELECT H.firstName,A.CardCode, DocNum AS 'Ord.No', CONVERT(varchar, A.DocDate, 3) AS 'Date', B.Dscription AS 'Item Name', B.ItemCode AS 'Item Code', SUM(B.quantity) AS 'Quantity', SUM(B.price) AS 'Price', SUM(B.LineTotal) AS 'Amount'
FROM ORDR A
INNER JOIN RDR1 B ON (A.DocEntry = B.DocEntry)
left outer join OHEM H on H.empID = A.OwnerCode
WHERE (A.DocDate >= '20111231') AND (A.DocDate <= '20170601')
--AND (A.OwnerCode = '3')
GROUP BY H.firstName, A.CardCode, A.DocNum, A.DocDate, B.Itemcode, B.Dscription
ORDER BY 'Date'
for summary
SELECT H.firstName,count(DocNum) 'Count'
FROM ORDR A left outer join OHEM H on H.empID = A.OwnerCode
WHERE (A.DocDate >= '20111231') AND (A.DocDate <= '20170601') --YYYYMMDD
--AND (A.OwnerCode = '3')
GROUP BY H.firstName
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi James.
Yes.. It's possible..
But You should provide more details..
You want to use the query manager in SAP B1? Or a Crystal Report? Or something else?
What kind of data you want to display? Only the sales agent (name or code) and the number or sales order in a range date or something other?
LUCA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.