pawankkmr 41145 (5/26/2015)
Complete list of Simple and complex t-sql puzzles athttp://msbiskills.com/tsql-puzzles-asked-in-interview-over-the-years/
This blog is useful for mid level developers , Strictly not for SQL Experts 🙂
Enjoy...
The problem with such puzzles are the restrictions. For example, the hierarchical problem restricts to SELECTs and CTEs, which is not a high performance solution in this case. They also seem to promote the idea that "set based" means "all in one query", which is patently not true and seems to get people into a lot of trouble performance wise.
Still, fun/intellectual stuff. Thanks for posting the link.
--Jeff Moden
Change is inevitable... Change for the better is not.