Past Perfect Continuous Tense

Past perfect continuous tense is used to describe a past action that was ongoing or in progress for a period of time before another past action took place. It is formed by combining "had been" + present participle(-ing) of the main verb

Here's an example:

"Before she retired, she had been working at the company for 20 years."

In this sentence, the past perfect continuous tense "had been working" is used to describe the ongoing or continuous action of working that took place for 20 years prior to her retirement, which is the second past action that took place.

Rules

RuleExamples
Subject + (had been) + present participle (verb + ing form)

I/You/We/They + had been + working

He/She + had been + working

Usage

Actions that were ongoing in the past and continued up until another point in the past:

1) I had been studying for three hours when my friend called.

2) She had been working at the company for five years before she got promoted.

3) They had been living in the old house for ten years before they moved out.

Actions that were interrupted by another event in the past:

1) I had been watching TV when the power went out.

2) She had been driving when she got lost.

3) They had been playing tennis when it started to rain.

Form

PositiveNegative"Yes/No" Question
I had been workingI hadn't been workingHad I been working?
We had been workingWe hadn't been workingHad we been working?
You had been workingYou hadn't been workingHad you been working?
He had been workingHe hadn't been workingHad he been working?
She had been workingShe hadn't been workingHad she been working?
They had been workingThey hadn't been workingHad they been working?