user: ### NOW ANSWER:
Question: What was the average number of people born in other EU states in millions, when the number of people born in a non EU state in millions was 31.368, and when the total population in millions was higher than 501.098?
Columns: ['Country', 'Total population (millions)', 'Total Foreign-born (millions)', 'Born in other EU state (millions)', 'Born in a non EU state (millions)']
Types: ['text', 'real', 'real', 'real', 'real']
Sample row: ['Germany', 81.802, 9.812, 3.396, 6.415]
SQL:

assistant: SELECT AVG("Born in other EU state (millions)") FROM "Table" WHERE "Born in a non EU state (millions)" = 31.368 AND "Total population (millions)" > 501.098;