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.

Nov 292013
 

As always, when you think you’ve got answers, put them in the comments.

exec dbms_output.put_line(chr(69) || chr(84));

select cephalopod 
from   molluscs
where  form like 'cat';

insert into visage
values ('flesh wound');

with affection as (
  select *
  from   soviet_nation
)
  select * from affection;

create sequence response;

select *
from   vehicles
where  type in (
  'flying vessels', 
  'locomotives', 
  'mechanised chariots'
);
Nov 222013
 

A quiz of a slightly different kind this time. The following SQL raises an ORA-01722 (invalid number) exception:

select *
from   this_simple_join tsj, 
       does_not_work dnw
where  tsj.column_1 = dnw.column_1
and    tsj.column_2 = dnw.column_2;

ORA-01722: invalid number 

We can fix this so no error is returned without changing the SQL statement itself. How is this possible?

Put your answers in the comments! I’ll post my full solution on Monday.

Nov 152013
 

A bit more highbrow this time, can you guess the book titles from the SQL clues below?

select burning_point
from   paper;

select toothed_gearwheels
from   device
where  colour = '#FFCCOO';

select *
from   creatures
where  species in (
  'Homo sapiens',
  'Mus musculus'
);

select spouse
from   voyager
where  chrono_displacement = 'Y';

select *
from   felines
where  clothing in (select type
                    from   headgear);


public class Rye extends  Wheat{
  public static void main() {
    try {
      Rye rye = new Rye();
    }
    catch (CerealException e) {
      System.out.println("Got you!");
    }
  }
}
I think most (all?) of these have been made into films now anyway though...

As usual, put your answers in the comments!

Nov 082013
 

Can you guess the film titles suggested by these SQL clues? As always, put your answers in the comments!

select english_bard
from   people
where  status = 'Enamoured';

with zohan as (
  select *
  from   you
  where  state <> 'Tidy'
)
  select * from zohan;

select boron
from   periodic_table;

select *
from   day
where  time between 'sunset' and 'sunrise';

set role fashion_displayers;

begin
  lock table inventory in exclusive mode;
  
  select count(*)
  into   vapour
  from   inventory 
  where  type = 'Cylindrical container'
  having count(*) = 2;
end;
/