Select Information from All Tables EER Diagram



Question

List the customer number, customer name (first and last), order number, order date, employee number, employee name (first and last), product number, product name, and order cost (product quantity * product unit price) for telephone orders (A telephone order has an associated employee) placed on January 23, 2007 and the order cost exceeds $150. Order the result by the order
cost in descending order.

My Code

SELECT
    Customer.CustNo,
    Customer.FirstName,
    Customer.LastName,
    `Order`.OrderNo,
    `Order`.OrderDate,
    Employee.EmpNo,
    Employee.FirstName,
    Employee.LastName,
    Product.ProdNo,
    Product.ProdName,
    CONCAT('$', ProductInOrder.Qty * SUBSTRING(Product.Price, 2)) AS `Order Cost`
From Customer, `Order`, Employee, Product, ProductInOrder
WHERE
    `Order`.Employee_EmpNo IS NOT NULL                          AND
    STR_TO_DATE(`Order`.OrderDate, '%m/%d/%Y') = '2007-1-23'    AND
    ProductInOrder.Qty * SUBSTRING(Product.Price, 2) &gt; 150
ORDER BY `Order Cost` DESC;


Result



14:57:29    SELECT  Customer.CustNo,     Customer.FirstName,     Customer.LastName,     Order.OrderNo,     Order.OrderDate,     Employee.EmpNo,     Employee.FirstName,     Employee.LastName,     Product.ProdNo,     Product.ProdName,     CONCAT('$', ProductInOrder.Qty * SUBSTRING(Product.Price, 2)) AS Order Cost From Customer, Order, Employee, Product, ProductInOrder WHERE  Order.Employee_EmpNo IS NOT NULL       AND     STR_TO_DATE(Order.OrderDate, '%m/%d/%Y') = '2007-1-23' AND     ProductInOrder.Qty * SUBSTRING(Product.Price, 2) > 150 ORDER BY Order Cost DESC LIMIT 0, 1000   1000 row(s) returned    0.290 sec / 0.011 sec



My Question

I think there is something wrong with the code From Customer, Order, Employee, Product, ProductInOrder. How to join all the tables together? If I use INNER JOIN, it will be more complicated.



Thank you for your help.
It says like syntax error, which you missed the ,

SELECT
    Customer.CustNo,
    Customer.FirstName,
    Customer.LastName,
    `Order`.OrderNo,
    `Order`.OrderDate,
    Employee.EmpNo,
    Employee.FirstName,
    Employee.LastName,
    Product.ProdNo,
    Product.ProdName,
    CONCAT('$', ProductInOrder.Qty * SUBSTRING(Product.Price, 2)) AS `Order Cost`
From Customer, `Order`, Employee, Product, ProductInOrder
WHERE
    `Order`.Employee_EmpNo IS NOT NULL                          AND
    STR_TO_DATE(`Order`.OrderDate, '%m/%d/%Y') = '2007-1-23'    AND
    `Order`.Cost &gt; 150
ORDER BY `Order`.Cost DESC;