我尝试做的是
SELECT tName, avg(Tutor.salary) AS avgSalary
FROM Tutor
GROUP BY tName
HAVING Tutor.salary > avgSalary;
答案 0 :(得分:0)
由于您的问题不完整,我假设您在表tName
中有列salary
和Tutor
。你想要做的是提取平均值然后比较:
SELECT tName, salary FROM Tutor
WHERE
salary > (SELECT avg(salary) FROM Tutor);