Past perfect: had + past participle
(had played / had seen / had broken / had done / had finished / had had ...)
had had = had + past participle of have
We use the past perfect to refer to events in the past which happened before other events in the past:
By the time we got to the cinema, the film had started.
When my mother got home, I HAD already HAD lunch.
" If I had had 50,000 yen, I could have bought this camera."
This is conditional type III: If +Past perfect + would / could / might have + past participle
(Impossible past conditions)
Used for the results which would follow from an imaginary past situation. As we cannot change the past, this is an impossible condition.
= I didn't have 50,000 yen (in the past). I f I had had enough money, I could have bought this camera.