Which one is the correct sentence?

Answer: 
Why did they go there yesterday?
Which one is the correct sentence?