Currently I have a query that returns a table with everything required but gives the total amount instead of average occurrences of the substances. It goes like this: