Re: Can this subquery be reduced to one line?
From: Henry Harrison <hharriso_at_tdc.dircon.co.uk>
Date: 7 Oct 1994 10:28:44 GMT
Message-ID: <3737ss$8jt_at_newsgate.dircon.co.uk>
Date: 7 Oct 1994 10:28:44 GMT
Message-ID: <3737ss$8jt_at_newsgate.dircon.co.uk>
Yes, the two queries are identical in this case.
Obviously, I don't know what the structure of your tables are, but my guess is that the example was MEANT to be somtething along the lines of:
SELECT employee from Employees
WHERE employee in
(SELECT employee,sum(Commission)
FROM Sales
GROUP by employee
HAVING sum(Commission) > 5000) - or whatever the figure you quoted was, I
can't remember.
which can't be reduced to a single query... Received on Fri Oct 07 1994 - 11:28:44 CET