[dba-SQLServer] SQL Workout

Billy Pang tuxedo_man at hotmail.com
Mon Nov 14 23:18:14 CST 2005


Hey group:

I'm always looking for a good sql challenge and I came across a decent one a 
few days ago so I'd thought I'd share.

The following logical problem (taken from a logical puzzles book) can be 
solved using only SQL.  See if you can solve it using only SQL.  I'll post 
my attempt in a few days.

Billy

------------------------------
Whose round?

Four friends met for happy hour drinks.  They sat at a round table and over 
the course of the evening had four rounds of drinks.  Each friend paid for a 
different round.  Can you discover where each friend sat, his or her full 
name, and the order in which the four paid for drinks?

1) the first two people who paid for drinks sat across from each other

2) Arnie paid for the round just after Millican

3) Nieland, who didn't pay for the fourth round of drinks, paid for a round 
sometime after Beth did.

4) The person who sat in seat #2 and the person who bought the fourth round 
of drinks are of the opposite sexes.

5) Clarice bought a round of drinks sometime after the person who sat in 
seat #1

6) Kowalski and Lehmer sat across from each other.

7) Neither Dave nor Kowalski sat in seat #4





More information about the dba-SQLServer mailing list