Distinct: 4
************************************************
select distinct (sales.repid), fname, lname FROM slspers, sales
WHERE qty > ANY
(SELECT SUM (qty) FROM sales GROUP BY repid)
AND sales.repid = slspers.repid
Without Distinct: 7
************************************************
select (sales.repid), fname, lname, qty FROM slspers, sales
WHERE qty > ANY
(SELECT SUM (qty) FROM sales GROUP BY repid)
AND sales.repid = slspers.repid
>>>>>>>>>> Lisa Ryan<<<<<<<<<
Lisa Prefer to understand
select distinct sales.repid, fname, lname FROM slspers, sales
WHERE sales.repid = slspers.repid AND
qty > ANY
(SELECT SUM (qty) FROM sales GROUP BY repid)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment