Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3530

Re: Query for Quotes converted to sales orders by %

$
0
0

Hi Roy,

 

Everything is possible in B1.

 

Try this and look to the headers of the columns.

Not tested.

 

SELECT T2.SlpName, Count(*) as 'Order converted from quotes in period', (select COUNT(*) from OQUT t1 where (T1.DocDate BETWEEN [%0] AND [%1]) and T1.SlpCode = T0.SlpCode) as 'Total Quotations in period' , Count(*) *100 /

(select COUNT(*) from OQUT t1 where T1.DocENtry = (Select Distinct T2.DocEntry from QUT1 t2 inner join rdr1 t3 on T3.BaseEntry = T2.DocEntry and T3.BaseLine = T2.LineNum inner join ORDR T4 on t4.DocEntry = T3.DocEntry where T2.DocEntry = T1.DocEntry  and T4.DocDate BETWEEN [%0] AND [%1]) and T1.SlpCode = T0.SlpCode) as 'percentage'


FROM OQUT T0 inner join OSLP T2 on T2.SlpCode = T0.SlpCode where T0.DocENtry = (Select Distinct T2.DocEntry from QUT1 t2 inner join rdr1 t3 on T3.BaseEntry = T2.DocEntry and T3.BaseLine = T2.LineNum inner join ORDR T4 on t4.DocEntry = T3.DocEntry where T2.DocEntry = T0.DocEntry  and (T4.DocDate BETWEEN [%0] AND [%1]))
Group by T0.SlpCode, T2.SlpName

 

I hope it helps


Viewing all articles
Browse latest Browse all 3530

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>