1) Syntax error; as you already figure out but probably didn't realize yet AVG() is not a valid column on emp table.
2) Syntax error; HAVING clause works on groups created by GROUP BY clause.
3) What?