由于某些原因,输出会一直告诉我,即使我不使用组功能,也无效使用它

问题描述 投票:0回答:2

这里是显示错误idk的代码段,为什么因为Im不使用组函数

select concat('$',max(employees.salary)), concat('$',min(employees.Salary)), concat('$',format(avg(employees.salary),2)), employees.job
from employees
where avg(employees.salary) > 3000; ```
mysql sql
2个回答
1
投票
SELECT job, CONCAT('$', MAX(salary)), CONCAT('$', MIN(salary)), CONCAT('$', FORMAT(AVG(salary), 2)) FROM employees GROUP BY job HAVING AVG(salary) > 3000;

0
投票
select concat('$',max(employees.salary)), concat('$',min(employees.Salary)), concat('$',format(avg(employees.salary),2)), employees.job from employees group by employees.job having avg(employees.salary) > 3000
© www.soinside.com 2019 - 2024. All rights reserved.