No one knew what I did.
No one knew what I had done.
Which sentence is grammatically correct and what's the difference between them?
No one knew what I did.
No one knew what I had done.
Which sentence is grammatically correct and what's the difference between them?
I agree with everybody above. Thank you, guys! I would also add that "had done" refers to something that happened prior to "No one knew..." and had some consequences, while "did" coincides with the moment of speaking. Progressive form - "was doing" would show the action in its progress while "did" simply states the fact without connecting it to the moment of speaking. Much depends on the context and what a speaker wants to emphasize. Thus:
I agree completely with Kate Bunting's comment and mostly with FF's. Both sentences are grammatically correct, but they have different meanings:
The simple predicates of both clauses are in the same tense, so the reader will probably infer that both actions ("knew" and "did") occurred at the same time. For example, perhaps you were feeding your dinner to the dog under the table and no one else at the table knew what you were doing. (I might prefer the progressive aspect in that case, though: "No one knew what I was doing.")
The simple predicate of the second clause is in the past perfect tense, implying that its action occurred before the action of the first clause, which is in the simple past tense.