I was wondering what is the grammar rule to include a question as a part of a sentence? Here are some examples:
Example 1:
Can you tell what am I missing? vs. Can you tell me what I am missing?
Example 2:
Tell me what am I missing? vs. Tell me what I am missing?
Example 3:
Do you know why he did this? vs. Do you know why did he this?
Example 4:
I don't know why he did this. vs. I don't know why did he this.