Write SQL query to solve given problem: Calculate the average number of students of all universities in 2012.. Keep the solution inside sql tag ```sql [SQL-Query] ```
SELECT AVG(num_students) FROM university_year WHERE year = 2012