What is the average salary of the employees who work as a Trainee?
average = DIVIDE( SUM(salary), COUNT(positiontitle) where positiontitle = 'Trainee'; Trainee is a position title
SELECT AVG(CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) AS avg FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T2.positiontitle = 'Trainee'