This Tense is used to express an action which began at some point of time in the past, continued for some time and was subsequently discontinued. In this tense the ‘ing’ form of the verb is used.
The formula for past perfect continuous is Subject +Aux +Aux + V4(ing form)
I had been eating apples until last year.
We had been eating apples until last year.
We had been eating apples until last year.
You had been eating apples until last year.
He had been eating apples until last year.
She had been eating apples until last year.
It had been eating apples until last year.
They had been eating apples until last year.