Show me all the monthly rentals from student addresses.
select monthly_rental from student_addresses
Give me the average monthly rental in terms of each address.
select address_id, avg(monthly_rental) from student_addresses group by address_id
Show me their cities.
select t1.city,t2.address_id, avg(t2.monthly_rental) from addresses as t1 join student_addresses as t2 on t1.address_id = t2.address_id group by t2.address_id
Give me the id and city of the one with largest average monthly rental.
select t2.address_id, t1.city from addresses as t1 join student_addresses as t2 on t1.address_id = t2.address_id group by t2.address_id order by avg(monthly_rental) desc limit 1