Similar to Past Perfect Tense, it is used when there are two situationshappened in the past. Using "Past Perfect Continuous Tense" with the situation that happened first and using Past Simple Tense with another situation.
However, Past Perfect Continuous Tense is used to highlight the first actions more than Past Perfect Tense or to give the feeling that the first action is happened for quite a long time.
John told me that he had been waiting for Marry for 2 hours.
Must know about Past Perfect Continuous Tenses
This tense is most used with teh verb "wait". Otherwise, it's not popular anymore.