Two Edinburgh primary schools have made it into a national top ten list from the Sunday Times newspaper.
St Joseph's Roman Catholic Primary School came in third and Prestonfield Primary School secured fourth spot.
The capital had a number of primary schools coming in the top 50 including Sciennes primary school in Marchmont at 37 on the list and James Gillespies primary school coming in at 45th.
Granton Primary School was the worst rated of all Edinburgh schools ranking 1159th on the list of 1179.
It is only the second time Scotland's school-by-school performance has been revealed at primary level, with the first league table published ahead of the return to school last August.
READ MORE: Edinburgh school closes after pupil found dead on school grounds
One Edinburgh primary school has beat the odds to become most improved in Scotland over last two years despite being in one of the most impoverished areas in the city.
Niddrie Mill Primary, in Edinburgh’s impoverished southeast of the city, had the biggest improvement in P7 attainment of any school in Scotland in 2021.
A higher proportion of P7 pupils can read, write and count to the required standard at Niddrie Mill than its more affluent neighbour Duddingston Primary, about a mile away.
The school with 90% of pupils from a deprived background got a score of 200 in 2019 which has peaked to a massive 370 this year.
Head Teacher Louise Cooke told the Times : “We are fighting the preconceptions and prejudices that families in Niddrie can feel.
"When I tell people where I work they say ‘Oh? Niddrie!’ but I tell them it is a wonderful place to work.
"We have fantastic children who are keen to learn and some really hardworking families who want their children to have the best education.”
Sign up for Edinburgh Live newsletters for more headlines straight to your inbox
Edinburgh Primary School League Table in full
St Joseph's Roman Catholic Primary School (EDI)
Prestonfield Primary School (EDI)
Sciennes Primary School (EDI)
Bonaly Primary School (EDI)
Dean Park Primary School (EDI)
James Gillespie's Primary School (EDI)
South Morningside Primary School (EDI)
Trinity Primary School (EDI)
Leith Walk Primary School (EDI)
Tollcross Primary School (EDI)
Preston Street Primary School (EDI)
Roseburn Primary School (EDI)
St Peter's Roman Catholic Primary School (EDI)
Corstorphine Primary School (EDI)
Ratho Primary School (EDI)
Bruntsfield Primary School (EDI)
St Francis' Roman Catholic Primary School (EDI)
Wardie Primary School (EDI)
Niddrie Mill Primary School (EDI)
Dalry Primary School (NA)
Oxgang Primary School (ED)
Clarkston Primary School (NL)
St Mary's Roman Catholic Primary School (Leith) (EDI)
Holy Cross Roman Catholic Primary School (EDI)
Abbeyhill Primary School (EDI)
Davidson's Mains Primary School (EDI)
Juniper Green Primary School (EDI)
Currie Primary School (EDI)
Gylemuir Primary School (EDI)
Broomhouse Primary School (EDI)
Pentland Primary School (EDI)
Parsons Green Primary School (EDI)
Oxgangs Primary School (EDI)
Queensferry Primary School (EDI)
Craiglockhart Primary School (EDI)
Blackhall Primary School (EDI)
Ferryhill Primary School (EDI)
Canal View Primary School (EDI)
Broughton Primary School (EDI)
Victoria Primary School (EDI)
Bun-sgoil Taobh na Pàirce ( Parkside Primary ) (EDI)
St Cuthbert's Roman Catholic Primary School (EDI)
Towerbank Primary School (EDI)
St Mary's Roman Catholic Primary School (Edin.) (EDI)
Fox Covert ND Primary School (EDI)
Echline Primary School (EDI)
Longstone Primary School (EDI)
Clermiston Primary School (EDI)
The Royal High Primary School (EDI)
Stockbridge Primary School (EDI)
Kirkliston Primary School (EDI)
Clovenstone Primary School (EDI)
St John Vianney Roman Catholic Primary School (EDI)
Liberton Primary School (EDI)
Gilmerton Primary School (EDI)
Leith Primary School (EDI)
Lorne Primary School (EDI)
Forthview Primary School (EDI)
St John's Roman Catholic Primary School (EDI)
Murrayburn Primary School (EDI)
Newcraighall Primary School (EDI)
Carrick Knowe Primary School (EDI)
Cramond Primary School (EDI)
Craigour Park Primary School (EDI)
Brunstane Primary School (EDI)
St Ninian's Roman Catholic Primary School (EDI)
Dalry Primary School (EDI)
Nether Currie Primary School (EDI)
Duddingston Primary School (EDI)
Flora Stevenson Primary School (EDI)
Sighthill Primary School (EDI)
Stenhouse Primary School (EDI)
Gracemount Primary School (EDI)
Hermitage Park Primary School (EDI)
East Craigs Primary School (EDI)
Hillhead Primary School (ED)
St Catherine's Roman Catholic Primary School (EDI)
Craigroyston Primary School (EDI)
Pirniehall Primary School (EDI)
Balgreen Primary School (EDI)
St David's Roman Catholic Primary School (EDI)
Royal Mile Primary School (EDI)
Granton Primary School (EDI)
Scotland's top 10 primary schools
- St Bernadette's Primary School (NL)
- St Andrew's Primary School (NL)
- St Joseph's Roman Catholic Primary School (EDI)
- Prestonfield Primary School (EDI)
- Symington Primary School (SA)
- St Mary's Primary School - Cleland (NL)
- Ravenswood Primary School (NL)
- Hill of Beath Primary School (FIF)
- Boghall Primary School (WL)
- St Joseph's Primary School (Whitburn) (WL)
Scotland's bottom 10 primary schools
- All Saints Primary School (INV)
- St Cuthbert's Primary School (GLA)
- Carbrain Primary School (NL)
- Smithton Primary (HIG)
- Dunoon Primary School (ARG)
- Buckhaven Primary School (FIF)
- Grantown Primary (HIG)
- James Hamilton Primary (EA)
- Applegrove Primary School (MOR)
- Hilton Primary (HIG)