Updated SQL for main risk assessor queries