Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2011

    Unanswered: Problem to calculate in MySQL

    Hi guys, I have a last question
    The question: what is the price of materials to manufacture product XXXX

    This is my tables:
    1. Product (product_name, product_price, BANR(PK)
    2. Get (BANR(FK), RID(FK)
    3. Recipe (receipe_name, r_update, RID(PK)
    4. IN (basic_goods_amount, goods_measure, RID(FK), IID(FK)
    5. Ingredient (ingredient_name, IID(PK)
    6. Deliver(purchase_amount, purchase_measure, purchase_price)
    All products have a unique recipe with a number of basic goods.
    Basic goods are purchased in quantities from a supplier.
    To answer the question I should choose a product and check out how much the ingredients cost and how much it needs.

    I think I must use the following calculation:

    purchase_price (table: Deliver) / purchase_amount (table: Deliver) * goods_measure (table: In).

    The result should roughly look like this:

    Product: name ............ Total Cost
    cheesecake ............... 10

    Please help me, Ive no idea how to solve this problem

  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    Quote Originally Posted by DaKlonker View Post
    Please help me, Ive no idea how to solve this problem
    is this true? really? ~no~ idea?

    you need to go back to your teacher and get more guidance

    we aren't going to do your homework for you, lol | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts