Foreign keys and implicit joins

Hi, in this video the person is able to group on products table columns that aren't explicitly joined in. The starting point is the orders table. It looks like she's done some definitions of foreign keys, and I'm guessing that's what allows it. Is there a good instruction that clarify the the requirements for making this kind of implicit joining work?

Thanks!

You can do that in Admin Settings -> Table Metadata -> Click on the table you want to set the foreign key in -> Change the type to 'Foreign Key and select the target ('target' = the column you want to automatically map).