First question: You can identify variables by the position number (left to right) from the order they are listed on the select statement. Thus, since desc was listed first, it can be specified as 1. That is sometimes important because a new variable might be computed in the select statement, but not explicitly assigned a name. Second question: desc and stay are the names of your two variables. Thus it is selecting desc and the mean of stay. Tom's suggested code actually specified select desc,mean(stay) mean as stay1, which was saying select desc and the mean of stay, and assign the mean to a variable called stay1.
... View more