Here are examples of sentences in the past perfect continuous tense:
1. Positive Sentences
I had been studying for three hours before the exam started.
She had been working at the company for ten years before she retired.
They had been playing football for an hour when it began to rain.
We had been waiting for the bus for 30 minutes when it finally arrived.
He had been practicing the piano for months before the concert.
2. Negative Sentences
I had not (hadn’t) been feeling well before I visited the doctor.
She had not (hadn’t) been sleeping enough due to her busy schedule.
They had not (hadn’t) been living there for long when they moved out.
We had not (hadn’t) been working on the project before the manager assigned it.
He had not (hadn’t) been exercising regularly before he joined the gym.
3. Questions
Had you been studying hard before the test?
Had she been working on the presentation all morning?
Had they been traveling for weeks before they reached their destination?
Had he been practicing for the match before it got canceled?
Had we been waiting for the guests before they called to cancel?
4. Uses
Duration before another past event: They had been living in that city for years before they moved.
Cause of something in the past: She was tired because she had been working all day.
Actions interrupted by another past event: I had been writing a letter when the phone rang.