You should use proper alias
and your group by
clause must include all the unaggregated columns as follows:
SELECT s.staffn, sh.job,
COUNT(*)"staffcount",
AVG(s.sal)"AverageSal"
FROM staff s join shop sh
WHERE s.shopno= sh.shopn
Group by s.staffn, sh.job
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…