Question

Using the CAP database handout. Write the relational algebra statement to answer the following question. Then write the SQL statement to answer the same question.

Get aids of agents who place individual orders in dollar value greater than $500 for customers living in Kyoto.

Chanter 2 The Relational Model ONeil, P., & ONeil, E (200). Database prineiples programming performance (2d ed.). San Franc

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Dear Student ,

As per the requirement submitted above , kindly find the below solution.

Question :

SQL Query :

Select aid from orders,customers where orders.cid=customers.cid and dollars > 500 and city=’Kyoto’ ;

Explanation :

  • Above query will look for orders above 500 for customer living in Kyoto.
  • Then it will return cid and match that customer id and return agent aid as aids.

NOTE : PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.

Add a comment
Know the answer?
Add Answer to:
Using the CAP database handout. Write the relational algebra statement to answer the following question. Then...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • SQL 3) List aid of Agents that placed an order for customer c003 or customer c006....

    SQL 3) List aid of Agents that placed an order for customer c003 or customer c006. 4) List pid of Products that were Ordered for customer c003 or customer c006. 5) List the sum in dollars of all orders ResuitsMessages cname city cid 2 Basics Dallas c002 12 3 Allied las c003 8 ACME Duluth c004 8 5 ACME Kyoto c006 0 aid aname city 1a01Smith New York 6 2 a02 Jones Newark 3 a03 Brown Tokyo 7 4a04 Gray...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT