Q:

New to MySQL and having issue with joining 3 tables with roll up by Month

I'm trying to show my Sales, CustomerReturns and Profit in one view.
I have done Inner Joins successfully across 2 tables, by month and successfully created views by month.  However, with 3 tables I get an error on either date or customerorders table (errors occur when playing around with code).  As the ProductID is the common column for all 3, I've put this into the ON and WHERE part.  
I've played around with the code based on tutorials (I'm learning MySQL workbench independently) and research.  It seems like the code below should be working.  I can't figure out what is wrong.  Please note I have tried to do two inner joins and hasn't worked either e.g.
INNER JOIN supplierstockorder ON customerorders.ProductID = supplierstockorder.ProductID = customerreturns.ProductID 
INNER JOIN customerreturns ON customerorders.ProductID = customerreturns.ProductID

Can anyone help?
Table 1 - customerorders(CustomerOrderID varchar(255) PK, 

Date DATE, 
CustomerID varchar(255), 
PaymentID varchar(255), 
ProductID varchar(255), 
Quantity int(20), 
OrderValue decimal(18, 2)
    Table 2 - customerreturns(ReturnID varchar(255) PK, 
CustomerID varchar(255), 
Date DATE, 
ProductID varchar(255), 
CRQuantity int(10), 
ReturnsValue int(10))
    Table 3 - supplierstockorder(SupplierStockOrderID varchar(255) PK, 
Date DATE, 
SupplierID varchar(255), 
ProductID varchar(255), 
Quantity int(10), 
CostPrice int(10), 
Vat decimal(10,2), 
SSOTotal int(10))
CREATE VIEW SalesProfitCrReturns AS
SELECT monthname(Date) as MonthDetails, SUM(customerorders.OrderValue) AS Sales, 
SUM(customerreturns.ReturnsValue) AS CustomerReturns, 
SUM(supplierstockorder.Quantity * supplierstockorder.CostPrice) 
- SUM(customerorders.OrderValue) 
- SUM(customerreturns.ReturnsValue) AS Profit
FROM customerorders, customerreturns
INNER JOIN supplierstockorder
ON customerorders.ProductID = supplierstockorder.ProductID = customerreturns.ProductID
WHERE customerorders.ProductID = supplierstockorder.ProductID = customerreturns.ProductID
GROUP BY MonthDetails with rollup;

A:

Below is an example of a valid query. For further help, see Why should I provide an MCRE for what seems to me to be a very simple SQL query
SELECT monthname(Date) MonthDetails
     , SUM(o.OrderValue) Sales
     , SUM(r.ReturnsValue) CustomerReturns
     , SUM(s.Quantity * s.CostPrice) - SUM(o.OrderValue) - SUM(r.ReturnsValue) Profit
  FROM customerorders o
  JOIN customerreturns r
    ON r.ProductID = o.ProductID 
  JOIN supplierstockorder s
    ON s.ProductID = o.ProductID
 GROUP 
    BY MonthDetails 
  WITH ROLLUP;

Note that this selects month data for all years, which is an odd request

