Your indentation is messed up.
By indenting the third step (the PROC) you make the code file look like you want to run the third step in the middle of the second step. You have to finish one step before you can start running another.
So put the steps in the right order.
proc summary data=work.boston_airbnb_listings nway;
var price_numeric;
output out=summary_stats
p15= p15
p25= p25
mean= mean_reviews
;
run;
data work.boston_airbnb_ratings;
set work.boston_airbnb_listings;
if _n_=1 then set summary_stats;
run;
Now that you have the summary stats merged back onto the detailed records you can begin to use them together.
But I don't think you are answering the question.
You seem to be trying to subset to values between the 15th percentile and the 25th percentile. But they are asking for the TOP values. Perhaps just the top 15% but perhaps as much as the top 25%. Totally different subset.
Also do you have those other variables it mentions? Or do you need to calculate those also?
... View more