How to create a joint frequency table?

Can you provide a reproducible example?