Hi Statausers!

I have a panel where I identify items with variable code, I have also 2 supermarket chains (sup_chain) and several waves:

code sup_chain wave price
001 A 1 10
002 A 1 8
001 B 1 10
002 B 1 8
001 A 2 12
002 A 2 10
001 B 2 12
001 A 3 12
002 A 3 12
001 B 3 14
So my question would be: How can I get the average price of those observations that appear in all the waves and in both supermarket chains? (in this case it would be only the observations identified with code 001 given that the one identified with 002 is not listed in wave 2 and 3 for sup_chain B).

Cheers