Queries and subqueries in MySQL, show customers with products purchased
Posted by:
John Bandan
Date: September 29, 2012 04:34PM
i have one problem this is my simple diagram:
http://i45.tinypic.com/121c48m.png
Well I tried a lot and I can not do what I need, I need to display a list of customers who have made purchases, with most purchased products in every purchase made, for example
Customer number 1 ---> BUY:
- 4 chicken soups
- 3 meat soups
- 2 shrimp soup
Customer number 2 --->BUY:
- 1 chicken soups
- 1 meat soups
- 2 shrimp soup
Customer number 3 --->BUY:
- 4 chicken soups
- 8 meat soups
- 1 shrimp soup
The result of my query must be:
http://i45.tinypic.com/2ni9w87.png
Please help me make this mysql query correctly
Subject
Views
Written By
Posted
Queries and subqueries in MySQL, show customers with products purchased
2332
September 29, 2012 04:34PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.