Past Perfect Continuous tense consists of the auxiliary verb had been (verb to be in the Past Perfect) and the proper verb with -ing ending:
I had been waiting there for an hour before the bus came.
I had been living there for two months when I got married.
QUESTIONS AND NEGATIVE FORMS
We form questions in Past Perfect Continuous through inversion and negative sentences by
adding word not to the auxiliary verb had:
I hadn’t been waiting long before the bus came.
Had you been waiting long before the bus came?
We use Past Perfect Continuous to describe activities that lasted until a certain moment in the past.
This tense corresponds to Present Perfect Continuous, only “transferred” to the past.
She has been smoking for twenty years now.
She had been smoking for twenty years before she finally gave it up.
Some verbs such as know, understand or like do not occur in continuous tenses.
We had known each other for years before he moved away. The past tenses also occur in sentences expressing the subjunctive, i.e. unreal situations from the present and the past.