Apr 242015
 

In celebration of my trip to Vegas last week, here’s clues to card games in SQL form:

-- Q 1
select surname || first_name
from   actors
where  films in (
  'Kung Fu Panda',
  'Nacho Libre',
  'King Kong'
);

-- Q 2
select description
from   dishonest_act;

-- Q 3
select (select name 
        from   elements 
        where atomic_number = 79) || 
       (em / 2)
from   hinged_barrier;

-- Q 4
select replace(name, chr(107), chr(116))
from   cooking_utensils
where  purpose = 'beating eggs';

-- Q 5
select listagg(ingredients, ' ') 
         within group (order by ingredients) ||
       (select word
        from   scrabble
        where  letters = 2
        and    points = 7)
from   cocktails
where  name = (
  select name
  from   music_styles
  where  period between 1600 and 1750
)

-- Q 6
select max(name), min(name)
from   cities
where  county = (select capital
                 from   isle_of_man);

There’s some tough ones this time around; bonus points to anyone who gets them all ;)

As always, put your answers in the comments.

  4 Responses to “SQL Brainteasers: Guess the Card Game”

  1. 1. Blackjack
    2. Cheat
    3. Gold!
    4. Whist
    5. Gin Rummy
    6. “ORA-01427: single-row subquery returns more than one row”

    • haha – Castletown doesn’t count and you know it! ;)

      3 is something else, otherwise you’ve got 1, 2, 4 & 5 – that was quick!

  2. Not sure if these are card games, but here’s where the SQLs are leading me…

    3. Golden Gate
    6. Tahoe

    • You’re really close with Golden Gate – what is it?

      Getting warm with Tahoe – you need to look at a different Douglas County

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)