Who Has The Monitor?

  • Lol, some people have way too much time.

    I take my hat off the solution in SQL, a truly indigenous method of employing our skills.  I don't know why but for every work related problem I immediately turn to SQL, however as soon as a simple none work related puzzle is introduced I bring out the pencil and paper.

  • “indigenous&rdquo?

    You keep using that word. I do not think it means what you think it means.

    Okay, let’s see you SQL gurus use SQL to come up with a solution to this puzzle. What is the next item in this sequence:

    O, T, T, F, F, S, S, __ ?

  • E, N, T

  • Aw, cs_troyk, you beat me.  I didn't see your post until just after I clicked Reply to answer the same thing.  And just to prove I did know the answer, I'll continue it. 

    E, T, T, F, F

  • Your right, it is one of the more common words I miss-spell.  I meant ingenious.

    However the meaning could still sort of apply.

  • NameColorCarDrinkMonitor
    SueBluePriusMountain Dew15" CRT
    SteveGreenCaravanCoffee17" CRT
    KevinWhiteSuburbanRed Bull15" LCD
    AndyYellowAccordIced Tea19" DUALS!!
    BrianRedCorvetteBeer17" LCD
  •  RedBlueGreenWhiteYellowSuburbanAccordPriusCorvetteCaravanRed BullMtn DewBeerCoffeeIced Tea17" CRT15" CRTDual 19"15" LCD17" LCDFirstSecondThirdFourthFifth
    BrianYNNNNNNnNyYNNNNNnnnyNNYNN
    SteveNNnnyNyNnnNynnNYNNNNNyNnn
    AndyNNNynNnyNnNNNNYNynnnNnNNy
    SueNYNNNNNnynNnyNNNnynnYNNNN
    KevinNNynNYNNNNNnNyNNNnynNNNyn
    BYRGW

    This is what I came up with.

    -John

  • Andy

  • I'm surprised at the number of posts claiming that there is just one solution. Below are the four solutions that SQL Server returned on my query. As far as I can see, all clues are satisfied in each of the four solutions. Am I missing anything?


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/

  •  

    BTW, the execution plan is definitely, ahem, "interesting"

    You can knock out about 100 possible combitation by adding the following inferred clues:

    AND NOT (Car = 'Accord' AND Monitor = '17" LCD')

    AND NOT (Car = 'Caravan' AND Monitor = '15" LCD')

    AND NOT (Person = 'Andy' AND Color = 'green')

    Unfortunately I can't see if that affects the results as my laptop's not capable of generating an execution plan for the final query!  That's a first for me!

     

  • Unfortunately I can't see if that affects the results as my laptop's not capable of generating an execution plan for the final query!  That's a first for me!

     
    Hi Glenn,
     
    I thinks it's the SQL Server version, not the laptop - SQL 2000 doesn't produce a plan for me either, but SQL 2005 does.
     
    Anyway, adding the extra filters doesn't change the results. Still four solutions!

    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/

  • Read it again: I didn’t ask you to guess the sequence (which is easy enough). I asked you to use SQL to come up with a solution to it — without hard-coding the English names of the numerals, by the way, nor having them in a Table of any kind.

  • Oops You're absolutely right -- I missed the part about using SQL Server, but now you're adding more conditions...

    The only thing that comes to mind is if SQL Server has a built in function to return english numeral names, or if it can call out to a system-supplied function. I'm not aware of such a function in either case. Do you have a solution?

    TroyK

  • Looks like http://en.wikipedia.org/wiki/Einstein's_Puzzle with a coat of paint!

    Except that there's a typo with: "Sue has the blue office". Perhaps it should read: "Sue is next to the blue office".

  • Joshua-

    In your solution, the Green room is not to the left of the White room....

Viewing 15 posts - 31 through 45 (of 50 total)

You must be logged in to reply to this topic. Login to reply