It does not need to be the same school.
According to the IRS:
"You're an eligible educator if, for the tax year you're a kindergarten through grade 12 teacher, instructor, counselor, principal or aide for at least 900 hours a school year in a school that provides elementary or secondary education as determined under state law."
https://www.irs.gov/taxtopics/tc458