I was browsing through the questions and noticed this:
SELECT prodid, issue FROM Sales WHERE custid = @custid AND datesold = SELECT MAX(datesold)
publish data where stoloc = 'AB143' | [select prtnum where stoloc = @stoloc]
This is how the @ works.
@