why doesn't this work?
select grade as rx from student_work
where rx > 23;
I get this error
Msg 207, Level 16, State 1, Line 1
Invalid column name 'rx'.
I just told it what rx is. I know there is no reason to do this in this query but I need to know why it wont work because it also doesn't work here:
from student_work sw2
where sw.student_name = sw2.student_name and sw2.grade >= sw.grade
) as rx
from student_work sw
where rx = 1