I was browsing through the questions and noticed this:
SELECT prodid, issue FROM Sales WHERE custid = @custid AND datesold = SELECT MAX(datesold)
@ followed by a number is the parameters in the order they're listed in a function.
@