Comparison of pupils' attainments between national assessments of knowledge and final school grades in mathematics