I was browsing through the questions and noticed this:
SELECT prodid, issue
FROM Sales
WHERE custid = @custid
AND datesold = SELECT MAX(datesold)
FROM Sales s
WHERE s.prodid = Sales.prodid
AND s.issue = Sales.issue
AND s.custid = @custid
What is the purpose of the "@" before custID, I wondered? Is it merely a method of referencing the custID from the specified table?