Interesting T-SQL problems