b1nary0mega
12/14/2015 - 2:39 PM

Get Median and Std Dev. data for evaluations that were finished past Sept. 1st (cutoff to count as an annual). (We don't want any non-annual

Get Median and Std Dev. data for evaluations that were finished past Sept. 1st (cutoff to count as an annual). (We don't want any non-annual data.)

SELECT YEAR,
  TITLE,
  MEDIAN(OVRLLRTNG)          AS MED_SCORE,
  ROUND(STDDEV(OVRLLRTNG),2) AS STD_DEV,
  COUNT(TITLE)               AS EVAL_COUNT
FROM EVAL_EMPL_PR
WHERE EVAL_STATUS = 'Finalized'
AND EMPL_DS_DT   IS NOT NULL
AND YEAR LIKE '2015%'
AND YEAR NOT LIKE '%COMPDEV%'
AND EMPL_DS_DT >= '01-SEP-2015'
GROUP BY TITLE,
  YEAR
ORDER BY MED_SCORE DESC;