Mar 302015
 

The following SQL statements are all clues to the names of trees:

--#1
select covering
from   mammals;

--#2
update wood
set    state = 'burnt';

--#3
select admiration
from   people
minus
select name
from   pronouns
where  type = 'second person';

--#4
select target
from   diseases
where  nationality = 'Dutch';

--#5
update oslo
set    appearance = 'smarter';

--#6
select *
from   elements e
join   punishments p
where  e.atomic_number = 47
and    p.type = 'beating';

Can you guess them all? Put your answers in the comments :)

Feb 152015
 

Here’s another six SQL brainteasers. This time the SQL is a clue to the power(s) of a superhero. Who is each superhero?

insert into body (skeleton)
values ('adamantium');

update person
set    strength = 'superhuman'
where  emotion = 'anger';

delete from powers
where  location = 'near Kryptonite';

update body
set    exoskeleton = 'ferrous material';

select *
from   women
where  equipment = 'noosed rope of veracity';

begin
  insert into boy (mouth)
  values ('Musa × paradisiaca');

  update boy 
  set    strength = '20 men',
         power = 'flight';
end;
/

As always, put your answers in the comments!

Jan 172015
 

Some more SQL clues, this time to chocolate bars.

select iso_code
from   countries
where  capital_city = 'Taipei'
and    9 = roman;

select *
from   planets
where  position = 4;

select characters
from   thundercats
where  age = 'prepubescent';

select *
from   ships
where  crew = 'mutinous';

select *
from   cities
where  that_is = 'Eboracum';

select min(volume)
from   speech;

When you’ve got them, put your answers in the comments!

Dec 312014
 

Another batch of SQL brainteasers. This time the clues are to the powers of mythical creatures – the task is to guess the creature!

There’s six in all, can you get them all? Put your answers in the comments!

update target_of_gaze
set    state = 'stone';

begin
  delete from creature
  where  appendage = 'head';

  insert into creature (appendage)
  values ('head');

  insert into creature (appendage)
  values ('head');
end;
/

update bird
set    state = 'alive'
where  state = 'burning';

select *
from   women
where  singing = 'deadly';

update creature
set    body = 'furry'
where  moon = 'full';

select *
from   men
where  powers in (
  'conferring playthings',
  'determining moral terpitude'
);
Nov 072014
 

Continuing the nation theme, here’s another six SQL clues to countries. Can you get them all?

select first_person
from   roman_eleven
where  business = 'abbreviated';

select aquatic_limb
from   places;

select *
from   dinner
where  contents in ('beef', 'kidney beans');

select character
from   films
where  actor = 'Tom Green';

select unrepeatable_position
from   flightless_birds
where  allegiance = 'Confederate';

select fortification
from   wine
where  second_person = 'female';

As always, put your answers in the comments!

Oct 192014
 

Same concept, different theme. All the SQL statements below are clues to the English spelling of countries.

Can you get them all?

As always, put your answers in the comments!

select *
from   german_affirmative
join   cooking_vessel;

select *
from   nuts
where  anaphylaxis = 'sexually transmitted';

select *
from   olde_english_the
join   males;

select *
from   elements
where  atomic_number = 47;

select *
from   programming_languages
where  able_to = 'influence PL/SQL';

select *
from   places
where  H2O = 'frozen';
Mar 212014
 

Back on the films today, here’s another six to get:

select talk
from   monarch;

select * 
from   (select city_name
        from   cities
        where  state = 'IL'
        order  by population desc)
where  rownum = 1;

select * 
from   nations
where  not exists (
         select null
         from   people
         where  status = 'retired'
         and    sex = 'male'
         and    p.location = n.location
);

sqlplus -s young_ovis_aries

select key
from   injury;

select *
from   human_property
where  duration between date '2000-01-01'
                and date '2012-12-31';

Finally, there’s something that links all the above films. Can you get it?

Put your answers in the comments!

Feb 212014
 

Back on the film quizzes this time with a mathematical twist for the clues:

select count(*) 
from   days_of_the_week;

select * 
from   cerebrum
where  power(e, i * pi) + 1 = 0;

select * 
from   direction_finder
where  length = (1 + sqrt(5)) / 2;

select * 
from   shape
where  height = width
and    width = depth;

select *
from   frankensteins_possesions
where  (x * x) + (y * y) + (z * z) = (r * r);

select *
from   unknown_people
where  E = m * c * c;

Can you guess all six? Put your answers in the comments!

Jan 242014
 

I’ve not been too well recently, so to “celebrate” here’s six SQL clues to various diseases. Can you get them all? Put your answers in the comments!

select *
from   domestic_fowl
join   pimply_rash;

select * 
from   body_parts
where  description in (
   'glove filler', 
   'walking attachment', 
   'food opening'
);

select max(temperature)
from   colours
where  hue = '#FFFF00';

select *
from   people
where  sex = 'Male'
and    location in (
    select name
    from   theatre_arts_academies
    where  location = 'Russia'
);

select *
from   arcane_programming_language;

select *
from   maldive_islands
where  location = 'southern most'
and    colour = '#00FF00';
Dec 162013
 

Christmas is approaching, so some Christmassy-themed songs to guess. Seven to get this time (because it’s Chrismtas ;). As always, put your answers in the comments!

select *
from   men
where  name like 'Christmas song'
and    rownum = 1;

select min(size)
from   equus_africanus_asinus;

sqlplus -s darkness

select *
from   days
where  extract(day from dy) = 25
and    extract(month from mn) = 12
and    colour = '#FFFFFF';

select *
from   plants
where  name in (select name
                from   girls_names);

select name
from   men
where  composition = 'frozen rain';

begin
  while (sheep_tenders = observant)
  loop
    sing;
  end loop;
end;

Note – the fourth one was updated from #000000 to #FFFFFF following comments from Salek.