MySQL Forums
Forum List  »  Newbie

help with query
Posted by: Simon Cooper
Date: June 02, 2011 05:10PM

I need some help with a project for school, I have developed a database and trying to run a query that displays the revenue earned from a particular product. In my database I have the rates listed as day_rate, weekend_rate and week_rate I would like to list the revenue earned as one field in my query this is my SQL statement so far any help would be greatly appreciated.

SELECT tbl_customer.customer_name, tbl_equipment.`description`, tbl_loan.stock_no, tbl_loan.date_out, tbl_loan.date_returned
FROM tbl_customer, tbl_equipment, tbl_loan, tbl_stock
WHERE tbl_stock.equipment_id=tbl_equipment.equipment_id AND tbl_loan.stock_no=tbl_stock.stock_no AND tbl_loan.loan_id=tbl_loan.customer_id AND tbl_loan.customer_id=tbl_customer.customer_id

Options: ReplyQuote


Subject
Written By
Posted
help with query
June 02, 2011 05:10PM
June 02, 2011 05:12PM
June 02, 2011 05:40PM


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.