MS Access does not directly support DISTINCT
syntax inside of an aggregate function. One workaround here would be to take the average of a subquery which finds the distinct salaries:
SELECT AVG(salary) AS avrage
FROM
(
SELECT DISTINCT E.salary
FROM (aircraft AS A
INNER JOIN certified AS C ON A.aid = C.aid)
INNER JOIN employees AS E ON C.eid = E.eid
WHERE A.cruisingrange > 1000
) t;
Note that I have also converted your old school implicit join syntax to modern explicit join syntax. This is the preferred way of writing SQL these days.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.