Study this example situation:
-yesterday morning-
Yesterday morning I got up and looked out of the window. The sun was shining, but the ground was very wet.
It had been raining.
It was not raining when I looked out of the window; the sun was shining. But it had been raining before.
Had been -ing is the past perfect continuous:
I/we/you/they had ( = I‘d etc.) been doing / working
he/she/it had ( = he‘d etc.) been doing / working





