What is the average temperature of all cities in October?
select avg(oct) from temperature
How many cities are there whose temperature in March is lower than that in July ?
select count(*) from city as t1 join temperature as t2 on t1.city_id = t2.city_id where t2.mar < t2.jul
What are the city names?
select t1.city from city as t1 join temperature as t2 on t1.city_id = t2.city_id where t2.mar < t2.jul
Please also show cities whose temperature in March is higher than that in Oct.
select t1.city from city as t1 join temperature as t2 on t1.city_id = t2.city_id where t2.mar < t2.jul or t2.mar > t2.oct