You might sometimes see a join structured:
"{CUBE}.id = {orders}.product_id"
or
"{CUBE}.id = {orders.customer_id}"
Basically everything inside { and } relates to the cubes, whereas everything outside is SQL.
So {orders}.product_id
references the product_id
column in the database, whereas {orders.customer_id
references the customer_id
dimension in the orders
model.