Past Perfect Continuous Tense

Past Perfect Continuous is formed by means of the auxiliary verb had plus been plus the verb with ending -ing.

For example:
She had been working as a clerk for 10 years before she resigned. 
Had she  been working as a clerk for 10 years before she resigned?

 Cases of using:

1. Action continuing over a period up to a spe­cific time in the past
She had been working as a clerk for 10 years before she resigned.

2. Past action of certain duration which had visi­ble results in the past
They were wet because they had been walking in the rain.

3. The Past Perfect Continuous is the past equivalent of the Present Perfect Continuous (She is going to the doctor. Her leg has been aching for two days.)

She went to the doctor. Her leg had been aching for two days.

Time expressions used with:

for, since etc.