We use the past perfect to talk about things that had happend before another one in the past.
E.g.: I had already finished my homework when you arrived.
A = Subj. + had + past participle + compl.
E.g.: I had finished my homework.
N = Subj. + hadn’t + past participle + compl.
E.g.: I hadn’t finished my homework.
I = Had + subj. + past participle + compl.?
E.g.: Had you finished your homework?
Past Perfect Continuous
We use the past perfect continuous to talk about things that had happend during some time before another one in the past.
E.g.: I had been cleaning for two hours before you arrived.
A = Subj. + had + been + verb-ing + compl.
E.g.: I had been cleaning.
N = Subj. + hadn’t + been + verb-ing + compl.
E.g.: I hadn’t been cleaning.
I = Had + subj. + been + verb-ing + compl.?
E.g.: Had you been cleaning?
A = Subj. + had + been + verb-ing + compl.
E.g.: I had been cleaning.
N = Subj. + hadn’t + been + verb-ing + compl.
E.g.: I hadn’t been cleaning.
I = Had + subj. + been + verb-ing + compl.?
E.g.: Had you been cleaning?