| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: beginners querying question
Jan Hidders wrote:
>> grp[|pricing ::= MIN(pricing)](Articles) join[pricing](Articles) >> >> is this possible? or reasonable? isnt there another... you know, a cuter >> way to do that? if this would work, it would seem to me like the dirtiest >> hack on world =)
umm, i used the join only, because i did not figure how to use the result of the grp (the computed pricing field), as a variable.
meanwhile i read on, and i found an example that tells better the part i dont understand:
| article | pricing | stock |
thats the three domains in the tupel, now: i want all the articles, that have a higher pricing than the most expensive article in stock 7.
what i would have to do now is to save the most expensive item in a variable, and this does not seem to be possible by the notation my book gives.
after some hard tries, i thought a work-around might work about the "full outer join".
the thing ive written down looks now like this, but this time im almost sure it does not work:
sel[pricing > max_pricing] (
(grp[|max_pricing ::= MAX(pricing)](
sel[store = 7](Article)
) join*[]*(Articel))
the idea: i copy the max pricing to any tupel of the relation and then i can compare in a simple sel statement.
the problem: ive got no idea if an outer join really works like this, and to be honest: using a true variable would look much more performant to me...
regards,
nick
--
Marriage is the only adventure open to the cowardly.
-- Voltaire
Received on Mon Aug 27 2001 - 14:40:35 CDT
![]() |
![]() |