Re: How do you like this SQL?

From: Mladen Gogala <>
Date: Fri, 14 Dec 2012 17:00:48 +0000 (UTC)
Message-ID: <>

On Fri, 14 Dec 2012 04:09:43 -0800, dombrooks wrote:

> It's not obvious that the model is messed up.
> It's not clear that there is a table missing.

So, why would one be computing maximum timestamp and do a group by in a sub-query? Most of the cases I've seen things like that have had a table missing. Groups of rows should be represented by a special object, as in ORDER and ORDER_ITEM tables. I am aware of the fact that this is not a mathematical proof and, given the query at hand, I believe that the developer should be given a fair trial water, like in MA in XVII century.

Mladen Gogala
The Oracle Whisperer
Received on Fri Dec 14 2012 - 18:00:48 CET

Original text of this message