aka Past Perfect Continuous or Pluperfect Progressive/Continuous
The English past perfect progressive indicates that an action in the past was happening before another action in the past. I It is conjugated with had been plus the present participle.
The past perfect progressive form emphasizes the duration or course of the action and may be used alongside the simple past or past conditional.
They had been winning the race before they crashed.
By the time they arrived, they had been travelling all day.
If it had been raining all night, the roads would have been wet that morning.
Related lesson: Past perfect