+ 1
select avg(price)
from apartments
where status = 'Not rented'
and ...
https://code.sololearn.com/cYsGY4y3pD71
+ 1
select price avg(price) won't work, try this instead
select avg(price) from apartments and status = 'Not rented'
+ 1
select * from Apartments
where price > (select avg(price) from Apartments) and status = 'Not rented'