What motivated John to work hard?
What function does the word "what" play in the sentence above?
Thank you
Don't let the fact that 'what' is an interrogative confuse you. Interrogatives may be used as the subject of the sentence.