-- selected the required information joining the three tables using customer_id and salesperson_id
SELECT order.id, customer.name, salesperson.name, (salesperson.commission*order.amount) AS commision_amount FROM order INNER JOIN customer ON order.customer_id=customer.id INNER JOIN salesperson ON order.salesperson_id=salesperson.id;