Question: SQL Query Question: Consider the Customers-Agents-Products (CAP) database with schema below. CUSTOMERS ( cid , cname, city, discnt) AGENTS ( aid , aname, city, percent)
SQL Query Question: Consider the Customers-Agents-Products (CAP) database with schema below.
CUSTOMERS (cid, cname, city, discnt)
AGENTS (aid, aname, city, percent)
PRODUCTS (pid, pname, city, quantity, price)
ORDERS (ordno, month, year, cid, aid, pid, qty, dollars)
where bold in each relation form the primary key.
List the names and ids of customers who (a) have ONLY ordered through agents in their own cities, and (b) placed the highest of purchase orders.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
