Hi Community,



How to convert the following SQL query into ESQ so that it can be used in the Script task Process element. 

 

SELECT TOP 1 SalesOwnerId 

FROM [Lead] 

WHERE SBLBranchLocationId ='060183EE-C2F3-4EDF-853C-59E28026EAD6' 

  AND LeadTypeId='669BC3A8-DFDB-4E53-8AAE-B643C2D6C677' 

  AND SalesOwnerId IS NOT NULL 

GROUP BY SalesOwnerId 

ORDER BY COUNT(SalesOwnerId) ASC

Like 0

Like

1 comments

Hi,

If you specifically need to use ESQ then take a look at this discussion where this topic was discussed.

However, in your case you can use Select class, with it you can easily use expressions like GROUP BY or ORDER BY.

Show all comments