Answer:
'Were there competitions the school had attended before' is a correct sentence.
Step-by-step explanation:
Here in both the sentences, the main idea is to know whether the school has attended any competitions before. ‘Before’ clearly means it is talking about the past, which has already happened.
Now in the former sentence it is questioned by saying "are". Are signifies something which is currently happening, that is, present tense. So definitely that is not a correct statement. Therefore the latter sentence – ‘Were there competitions the school had attended before?’ is a correct grammatical statement.