Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Vinnie881
Master Smack Fu Yak Hacker
1231 Posts |
Posted - 2012-04-20 : 18:00:17
|
For all of you that enjoy just a fun challenge, and actually enjoy t-SQL, here's a fun riddle to try to solve with t-SQL. I'll post the method I used tomorrow.******Variations of this riddle appear on the net from time to time. It is sometimes attributed to Albert Einstein and it is claimed that 98% of the people are incapable of solving it. Some commentators suggest that Einstein created such puzzles not to test out intelligence but to get rid of all the students who wanted him as an advisor. It is not likely that there is any truth to these stories. Whereever this comes from, it is a nice riddle.Let us assume that there are five houses of different colors next to each other on the same road. In each house lives a man of a different nationality. Every man has his favorite drink, his favorite brand of cigarettes, and keeps pets of a particular kind.The Englishman lives in the red house.The Swede keeps dogs.The Dane drinks tea.The green house is just to the left of the white one.The owner of the green house drinks coffee.The Pall Mall smoker keeps birds.The owner of the yellow house smokes Dunhills.The man in the center house drinks milk.The Norwegian lives in the first house.The Blend smoker has a neighbor who keeps cats.The man who smokes Blue Masters drinks bier.The man who keeps horses lives next to the Dunhill smoker.The German smokes Prince.The Norwegian lives next to the blue house.The Blend smoker has a neighbor who drinks water.The question to be answered is: Who keeps fish? Success is 10% Intelligence, 70% Determination, and 22% Stupidity.\_/ _/ _/\_/ _/\_/ _/ _/- 881 |
|
robvolk
Most Valuable Yak
15732 Posts |
|
Vinnie881
Master Smack Fu Yak Hacker
1231 Posts |
Posted - 2012-04-20 : 18:28:50
|
I guess I am not the innovator of this idea:) Yeah, in school a teacher gave it to me on paper, but that was back in probably 1995 or so.. I figured it would be fun to do with a modern database approach. Thanks for posting, I'm curious to see if everyone used the same method, I'll check the comments. Success is 10% Intelligence, 70% Determination, and 22% Stupidity.\_/ _/ _/\_/ _/\_/ _/ _/- 881 |
 |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2012-04-20 : 20:01:23
|
Post your solution here anyway, no matter what. |
 |
|
Vinnie881
Master Smack Fu Yak Hacker
1231 Posts |
|
|
|
|
|
|