'Which' is more formal than 'what' and tends to be used for choices. If you are asking informally about a specific thing, you can use 'what': e.g. 'what high school are you studying at?'. In your example, it looks as though you are missing 'school' after elementary. To make this question make sense you would need to write 'At which elementary school did you study?' Ho