A. I wonder what words are omitted between "doing" and "sleeping".
What are you doing sleeping in the middle of the day?
B. I would like to know the difference between "1" and "2".
1. Are you sleeping in the middle of the day?
2. What are you doing sleeping in the middle of the day?

