The names of the table there are employees
How to put the order in freight fee respectively added up to all employees
Like employees with ID 1 freight fee together with ID 2 employees of the freight fee together
Then the employee ID and employee list for employee name
Sail soft finereport database statements


CodePudding user response:
SELECT employees name, a. b. subtotalThe FROM (SELECT employees ID, the SUM (freight charges) AS subtotal FROM order) AS A
The JOIN table B ON a. employees ID=b. employee ID