SELECT day, month, year,
winning_country.country_name winning_country,
losing_country.country_name losing_country,
matches.winning_score, matches.losing_score, location, crowd, worldcup, (matches.winning_score + matches.losing_score) as totalpoints
FROM matches,
countries winning_country,
countries losing_country
WHERE (matches.winning_country = winning_country.country_id)
AND (matches.losing_country = losing_country.country_id)
AND (totalpoints>50)
When I run this query, I get an error saying column totalpoints does not exist. Why is that?