You are not logged in Log in Join
You are here: Home » Members » MJ's corner on Zope » QuantumPythons » Question1

Log in
Name

Password

 
 

History for Question1

??changed:
-
Question 1

  Get agent id value, 'aid', for agents _not taking_ orders from any customer 
  in Duluth for any product in Dallas.

  SQL::

    select aid 
        from agent 
        where aid not in (
            select distinct aid
                from ord_order_line ool, customer, product
                where ool.cid = customer.cid
                    and ool.pid = product.pid
                    and customer.city = 'Duluth'
                    and product.city = 'Dallas');

  Output:

    *There was no output; all agents have taken such orders.*

<hr solid id=comments_below>


mj (Sep 14, 2001 9:39 pm; Comment #1)  --
 I'll kick off with this one.