Added AND sched.DisplayGroupIDs = 12 in SQL statement