Scenario
Customer details are stored within the customers table, while the sales order details are stored within the transaction table. To gather associated Customer details for a specific Sales Order, both tables should be joined together. In the situation of a Sales Order, the entity_id of transaction is the customer_id in the customer table. Therefore, the entity_id and customer_id columns can be used to link both tables.
Solution
Please refer to sample query below: