Hi guys, I need your help generating a mySQL query.
I have the following DB tables:
What I need to do is to generate ONE single query so that I can display the results on a web page like this:
1- Author's Name (from the authors table)
2- Product title (from the products table)
3- Number of purchases made for this product
4- The total sales for this product
Pls help ASAP
I have the following DB tables:
Code:
AUTHORS:
- Id
- Name
PRODUCTS:
- Id
- AuthorId
- Title
ORDERS:
- OrderId
- CustomerId
ORDERDETAILS:
- OrderId
- ProductId
- Price
What I need to do is to generate ONE single query so that I can display the results on a web page like this:
1- Author's Name (from the authors table)
2- Product title (from the products table)
3- Number of purchases made for this product
4- The total sales for this product
Pls help ASAP
Last edited:






