The wh-phrase (possibly formed only by the wh-sign) plays a grammatical function in the interrogative sentence, e.g. subject, direct object, indirect object, or adverbial modifier. No matter what grammatical function the wh-phrase plays, the dedicated position for wh-phrases is sentence-final. Therefore, even if the neutral order in a declarative sentence is Locative - Subject - Object - Verb as in (a), this order changes if a wh-sign is present, since the latter moves in sentence final position, no matter if it is the subject as in (b), the direct object as in (c), or the locative as in (d). In all these sentences, the verb is followed by an aspectual marker, done, which indicates that the event is concluded (LEXICON 3.3.2; MORPHOLOGY 3.3.2.3).
a. milan gianni house buy done
โGianni bought a house in Milan.โ
wh
b. A: milan house buy done who
B: gianni
โWho bought a house in Milan?โ โGianni.โ
wh
c. A: milan gianni buy done what
B: house
โWhat did Gianni buy in Milan?โ โA house.โ
wh
d. A: gianni house buy done where
B: milan
โWhere did Gianni buy a house?โ โIn Milan.โ
Also, in wh-interrogatives it is possible to repeat the subject pronoun. When this happens, the subject pronoun follows the wh-sign, so the latter is not strictu sensu sentence final.
wh
ix2 live where ix2
โWhere do you live?โ
The dedicated position for the wh-phrase is sentence-final in embedded interrogatives as well.
wh
ix1 want know house buy who
โI want to know who bought the house.โ