The league table looks at primary schools across Scotland and assessed them on a number of metrics, with scores out of 100 on listening and talking, numeracy, reading and writing. Across the country, no fewer than 81 schools scored a perfect 400 out of 400.
It also uses neighbourhood deprivation figures which take into account income, jobs, health, education, housing, crime and access to local amenities.
A spokesperson for the Sunday Times said: “We are always careful to clarify that The Times Scotland Primary School League Table is not 'Scotland's schools ranked from best to worst'.
“It presents government data from primary seven, arguably the most important year for pupils preparing for high school, for parents to analyse standards across the 1,250 schools that published reportable results. Our aim is to present data in an easily accessible format that parents can understand.”
Scroll through our picture gallery to which 15 primaries from Edinburgh and the Lothians scored full marks.

1. The best primary schools in Edinburgh and Lothians
Take a look through our picture gallery to see the 15 best primary schools in Edinburgh and the Lothians, according to the Sunday Times Photo: Pixabay

2. Holy Cross RC Primary School
Where: Craighall Road, Edinburgh EH6 4RE. Scored a perfect 400 out of 400. Deprivation: 20%. Photo: Third Party

3. Wardie Primary School
Where: Granton Road, Edinburgh EH5 3NJ. Scored a perfect 400 out of 400. Deprivation: 10%. Photo: Third Party

4. Pentland Primary School
Where: Oxgangs Green, Edinburgh EH13 9JF. Scored a perfect 400 out of 400. Deprivation: 20%. Photo: Third Party