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.
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