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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!