Ooooooooh. Now I see my mistake.Elementary? At its heart it is an old style major network episodic mystery show, a little on the quirky side so a bit like Monk or The Mentalist, but IMO the best writing of that lot and time period, and spends less time winking at the audience. What really sets it apart IMO is the relationship between Holmes and Watson. It's among the very best depictions of non-romantic love between unrelated friends, and it develops over time. I also think Jonny Lee Miller is superb in the role and Lucy Liu nearly as strong. I'm on S3 of my rewatch. With seven seasons and 150+ episodes, there's also inevitably some variance in episode quality.
The show you just described sounds nothing like a comedy about a bunch of 3rd grade teachers. I was confused.