I think I have a tough one here. I have written a query that pulls some survey results. The survey has 11 question. My query is working as I intend thus far:use pdpadmin_devselect 'Center' = cen.Centername, 'Subsidiary' = sub.Subsidiaryname, 'Manager' = su.managername, 'Supervisor' = su.supervisorname, 'Planning and Execution' = cast(res.skills_planningexecution as float), 'Time Management' = cast(res.skills_timemanagement as float), 'Continuous Improvement' = cast(res.skills_continuousimprovemen as float), 'Interpersonal Skills' = cast(res.skills_interpersonal as float), 'Communicaiton Skills' = cast(res.skills_communication as float), 'Leadership Skills' = cast(res.skills_leadership as float), 'Integrity' = cast(res.culture_integrity as float), 'Respect' = cast(res.culture_respect as float), 'Professionalism' = cast(res.culture_professionalism as float), 'Innovation' = cast(res.culture_innovation as float), 'Commitment' = cast(res.culture_commitment as float) from pdpadmin_dev..supervisor su INNER JOIN pdp..vw_results_67732 res on su.supervisorid = res.supervisorid and res.questionid=49 INNER JOIN TPReports..info_center cen on su.center = cen.center INNER JOIN TPReports..info_subsidiary sub on cen.subsidiaryid = sub.subsidiaryidORDER BY cen.Centername, sub.Subsidiaryname, manager, supervisor
This lists all supervisor answers to the survey and orders them by location, manager, etc. Pretty straight forward.But, my next task is to return the two lowest scores for each row. Technically I'm after the two categories of the lowest two scores. I'm not sure how to get there though. Can anyone help?ThanksCraig Greenwood