I was under the impression that SQL went FROM, WHERE, GROUP BY, HAVING, SELECT, ORDER BY. Is that not correct?
I've got the query
SELECT A.cruisingrange, AVG(E.salary) AS avgsal, A.aname
FROM employees AS E, aircraft AS A, certified AS C
WHERE A.aid = C.aid AND C.eid = E.eid
GROUP BY A.aname
HAVING A.cruisingrange > 1000;
but it breaks if I take out A.cruisingrange in the SELECT statement. I do not want it to return A.cruisingrange.
Thanks!
2007-09-16
12:18:44
·
2 answers
·
asked by
dawhitfield
3