The question I have is I have to add another restriction: All the listed items have to be green. So i found the colour of the items are in the table xitem. Where should I add that comment to my current code?
My current code is:
SELECT DISTINCT * 
FROM xsale, xdept 
WHERE xsale.deptname IN 
  (
    SELECT deptname 
    FROM xsale 
    WHERE xsale.deptname=xsale.deptname 
    AND deptfloor <> 1
  )
 
    