Stata - syntax for if exp

I would like to regress y (dependent variable) on x (independent variable) while limiting y to those observations having a value greater than the mean of those with the same z value.

Said another way - I want to regress education on income but only the education observations that are above the mean of the state from which the observation is denoted (i.e. those observations for education which are above the mean for Arkansas for respondents from Arkansas, and Montana from Montana, etc.).