Question: SQL / R programming question: Q: Retrieve the product names and product colors that have been ordered by ALEX or CAROL. Here are the relations

SQL / R programming question:

Q: Retrieve the product names and product colors that have been ordered by ALEX or CAROL.

Here are the relations that need to be joined: (Also my database is named 'amydb2' that includes all these relations). (I'm just not sure how to write my code to combine these 4).

CUSTOMER:

CUST_NO,NAME,ADDRESS C1,ALEX,State C2,BOB,Hollister C3,CAROL,Ocean C6,JUAN,Phelps

PRODUCT:

PROD_NO,NAME,COLOR p1,PANTS,BLUE p2,PANTS,KHAKI p3,SOCKS,GREEN p4,SOCKS,WHITE p5,SHIRTS,WHITE

SALES ORDER:

ORDER_NO,DATE,CUST_NO 01,11/11/17,C1 02,7/9/17,C3 09,8/16/17,C6 010,10/12/17/,C6

SALES ORDER LINE:

ORDER_NO,PROD_NO,QUANTITY 01,p1,10 02,p1,10 02,p4,20 09,p1,05 010,p1,05

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!