title: homework / sqlite3 avg outcome strange
body: <p>My task is to write a a SQL query to determine the average rating of all movies released in 2012 using an imdb movies.db file.</p>
  <p>The values for this query are in two tables:</p>
  <p>Table 1 MOVIES /
  <strong>id</strong> INTEGER /
  <strong>title</strong> TEXT NOT NULL /
  <strong>year</strong> NUMERIC</p>
  <p>Table 2 RATINGS /
  <strong>movie_id</strong> INTEGER NOT NULL /
  <strong>rating</strong> REAL NOT NULL /
  <strong>votes</strong> INTEGER NOT NULL</p>
  <p>My method is to approach the desired outcome step by step. So at the moment I have a list - limited for better overview - of ratings of movies released in 2012. I've wanted to count the average of these ratings and since the outcome was wrong I've checked it for sum and I got a very strange number.</p>
  <p>Could anyone explain me what is happening here?</p>
  <p><a href="https://i.stack.imgur.com/sbAA4.png" rel="nofollow noreferrer">picture of code and outcome</a></p>