Grouping Data Using Joined Tables with Certain Distinct Values
Remove the DISTINCT.  But... Then you will probably find the results are too big.  Here's why:

Think of gathering all the data for all the Orders + OrderLines -- one row for each combination.  Notice how that will include o.grossValue is multiple times.

What you need to do is to the o. summations before JOINing to ol.

But now I am wondering about something.  Your schema allows for one order to be fulfilled from multiple stores.  However, since your data does not have an example of such, I wonder which is true:


An order can come from only one store.  In this case moving the storeID to orders would be 'right' and make the query much simpler.
An order can come from multiple stores.  In this case, please augment the data set so that a proposed solution can be checked.


I don't think you need 'LEFT'.