Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL Fun Challenge #2

Re: SQL Fun Challenge #2

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Thu, 4 Mar 2004 09:13:03 +0000 (UTC)
Message-ID: <c26ruv$kgd$1@titan.btinternet.com>

Comment in-line.

-- 
Regards

Jonathan Lewis
http://www.jlcomp.demon.co.uk

The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html

March 2004 Hotsos Symposium - The Burden of Proof
  Dynamic Sampling - an investigation
March 2004 Charlotte OUG (www.cltoug.org) CBO Tutorial
April 2004 Iceland
June  2004      UK - Optimising Oracle Seminar


"Noons" <wizofoz2k_at_yahoo.com.au> wrote in message
news:73e20c6c.0403040013.543cb30a_at_posting.google.com...

> Daniel Morgan <damorgan_at_x.washington.edu> wrote in message
news:<1078359740.735908_at_yasure>...
>
> Being the anarchist bastard I always have been, I'm gonna throw
> the solution upside down. Using only a join to filter the result.
> Follow me folks: the ride is wild...
>
> > Two mathematicians (Boris and Vladimir) met accidently for the first
> > time in 20 years.
>
> Ah, so the three kids must ALL have less than 20 years of age.
> OK, let's create suitable tables (stay with me Daniel, if you please):
>
Adopted ? Step-children ?
>
> Hmmm, still not happy. Let's assume that a kid
> cannot be born within one year from the other
> (or else Mum will declare war...):
>
If it can go wrong, it will.
>
> AH! MUCH better!
> Assuming that Boris can count and there are no anomalies
>
Good point - Boris and Vladi are both mathematicians, but not architects, so they may have different perspectives of what to count for a double-fronted bay window.
>
> such as twins (Vladi did not specifically say there were
> twins, so I assume there aren't), he should now know the ages.
> I've automatically pruned all anomalies with my SQL.
>

>
> Darn you, Daniel! You had to throw a spanner in the works, didn't you?
> I'll have to assume an exception: twins!
That's not an exception, it's a corollary to a well-known rule if you can't afford it, it happens (see above) Boris is a mathematician, which more or less guarantees that he is undervalued and underpaid, and therefore cannot afford twins. Note that the final solution shows that he was suckered into the twins - the first attempt gave him one child and a false sense of security.
>
> Hmmm, Vlad doesn't lie or split hairs, so if he's saying
> "the eldest", it can only be the second combination.
> There can't be the eldest with twins (I hope...):
>
When I tested this out ('the youngest has a pet hamster with a wooden leg') in one part of America, it fell flat because the audience generall didn't consider twins to be the same age. Luckily I tested it before going into production in front of a full audience.
>
> But it's easier to explain using three tables.
>
And we should almost always assume that easy is better than smart for a one-off case - and explaining is just as important as doing. Part 2: Produce a solution from an account that has only the "Create session" privilege.
> Cheers
> Nuno Souto
> wizofoz2k_at_yahoo.com.au.nospam
Received on Thu Mar 04 2004 - 03:13:03 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US