How do we make the Past Perfect Continuous Tense?

The structure of the past perfect continuous tense is:

subject+auxiliary verb HAVE+auxiliary verb BE+main verb
conjugated in simple past tensepast participlepresent participle
hadbeenbase + ing

For negative sentences in the past perfect continuous tense, we insert not after the first auxiliary verb. For question sentences, we exchange the subject and first auxiliary verb. Look at these example sentences with the past perfect continuous tense:

 subjectauxiliary verbauxiliary verbmain verb 
+Ihad beenworking. 
+Youhad beenplayingtennis.
-Ithadnotbeenworkingwell.
-Wehadnotbeenexpectingher.
?Hadyou beendrinking? 
?Hadthey beenwaitinglong?

When speaking with the past perfect continuous tense, we often contract the subject and first auxiliary verb:

I had beenI'd been
you had beenyou'd been
he had
she had been
it had been
he'd been
she'd been
it'd been
we had beenwe'd been
they had beenthey'd been

How do we use the Past Perfect Continuous Tense?

The past perfect continuous tense is like the past perfect tense, but it expresses longer actions in the past before another action in the past. For example:

Ram had been waiting for two hours when I arrived.
pastpresentfuture
Ram starts waiting in past at 9am.  
9 11


I arrive in past at 11am.  

Here are some more examples:

You can sometimes think of the past perfect continuous tense like the present perfect continuous tense, but instead of the time being now the time is past.

past perfect continuous tense present perfect continuous tense
had |
been |
doing |
>>>> |
|
|
|
|
|
|
|
|
have |
been |
doing |
>>>> |

 
pastnowfuture pastnowfuture

For example, imagine that you meet Ram at 11am. Ram says to you:

Later, you tell your friends: