Koen Verbeeck (1/28/2013)Apparently, there are 4 winter months? Anyway, I don't have AdventureWorks 2012 installed on this machine, so I had to guess. Quite a pity, because the idea of the question was good.

+1, exactly my sentiment. Shame, because it would have been a really good question.

Koen Verbeeck (1/28/2013)Apparently, there are 4 winter months? Anyway, I don't have AdventureWorks 2012 installed on this machine, so I had to guess. Quite a pity, because the idea of the question was good.

+1, exactly my sentiment. Shame, because it would have been a really good question.

There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan I would never join a club that would allow me as a member - Groucho Marx

Tough I applaud the effort to create questions on new SQL2012 functionality, I really see nothing positive about this question.

First, without AdventureWorks2012 it's impossible to answer the question. True, everyone can download that sample database - but if you doon't have SQL Server 2012, will it even install? I never tried, but I doubt it. And if you use an older version of AdventureWorks, you can't be sure that the data is identical.

Second, even with an AdventureWorks2012 database, it is still almost impossible to answer without running the code. There are 290 rows in the Employee table. Do you really expect me to go over them by hand and count the months from all the hiredate values?And if I just run the code, it kind of defeats the purpose of learning about the Choose function.

Third, I don't understand the uneven distribution of months in the CHOOSE function. I know Ron long enough to trust that he didn't deliberately make this into a trick question, but it has turned out that way - with four months being assigned to winter and only two to spring, I am not surprised to see a high percentage of people choosing "most in winter / least in spring". If I had not had access to AdventureWorks (and hence been forced to guess), I would have picked that combination too, based on the season list in the CHOOSE function.

This question would have been so much better if it had been based on a much lower number of rows that were included in the question (so that you could just count the results by hand). Lost opportunity - too bad!

As someone who definitely tries to run through the question in my mind, and not against an actual database, I also agree that it would have been helpful if the question included the table data as well.

Koen Verbeeck (1/28/2013)Apparently, there are 4 winter months? Anyway, I don't have AdventureWorks 2012 installed on this machine, so I had to guess. Quite a pity, because the idea of the question was good.

However, if you try to answer the question within ten minutes of getting out of bed, you don't even notice that there are four months for Winter - at least I didn't. I wrongly assumed three for each, as my browser window was small and the end of the code line went off the page.

Then I just assumed an even distribution of employee hire dates. Understanding how CHOOSE works, I then correctly answered a question that wasn't asked.

Please don't go. The drones need you. They look up to you.Connect to me on LinkedIn

Hugo Kornelis (1/28/2013)Tough I applaud the effort to create questions on new SQL2012 functionality, I really see nothing positive about this question....This question would have been so much better if it had been based on a much lower number of rows that were included in the question (so that you could just count the results by hand). Lost opportunity - too bad!