sql; percent distribution with counted values
问题 I have a table (Salaries) with salaries distributed on gender and job titel. I want to show the results on gender for every job titel I have in my database plus the total value. For example for the first titel I have this code: select 'Female' as '____', count(gender) as Number, SUM(Salary) AS Total_Salary, MIN(salary) AS Min_salary, AVG(salary) AS Avg_Salary, MAX(salary) AS Max_Salary from Salaries where gender= 'Female' And Job_titel='Adm assistent' union ( select 'Man' as '____', count