|
|
scott wrote:
>> SELECT *
>> FROM EventRecord AS X, EventRecord AS Y, EventRecord AS Z
>> WHERE
>> X.ExperimentID = Y.ExperimentID AND
>> Y.ExperimentID = Z.ExperimentID AND
>> X.EventID = 0 AND
>> Y.EventID = 2 AND
>> Z.EventID = 1 AND
>> X.EventDateTime < Y.EventDateTime AND
>> Y.EventDateTime < Z.EventDateTime;
>>
>> Or similar. (It's been a while since I did SQL...)
>
> Oh cool that helps a lot, I'm copying and pasting that to a file
> somewhere for reference, thanks.
It seems so easy when you already know how, eh? ;-)
> I still need to order myself an SQL book...
You wanna know what I have on *my* bookshelf?
http://www.amazon.com/Introduction-Database-Systems-C-Date/dp/0201385902
As I understand it, this is considered one of the "seminal texts" on
relational databases. Take a look at those stats: it's almost a thousand
pages, and weighs over 1.6 Kg. In other words, it's a *tome*.
And I've read it, cover to cover.
Even I cannot comprehend the relational calculus though. Relational
algebra, sure. But relational calculus? Nah.
> I guess that's the sort of question they should ask you at an interview :-)
What, as opposed to "what is the unladen velocity of a swallow?"? 0;-)
Post a reply to this message
|
|