Suppose I have two tables, A and B. A has two columns: score, location.
B has two columns leftLocation, rightLocation.
I need the maximum score located outside all entries in table B. B is a
small table, say less than 100 entries.
I tried this:
SELECT max(score),location FROM A, B GROUP BY score HAVING location <
min(leftLocation) && location > max(rightLocation)
It doesn't work the way I think it should, not to mention it's the wrong
algorithm because left/rightLocation are made to be used in pairs.
So, how is it done?
Thanks,
Brannon