MySQL Forums
Forum List  »  Newbie

select min record from many to many relationship
Posted by: eran ya
Date: June 20, 2018 10:18PM

Hi,

I would like to get minimum record from a many to many relationship where id equals to specific value

I have following tables"
product, supplier and product_has_supplier.
product table contains product_id and product_name column.
supplier table contains supplier_is, supplier_name
product_has_supplier table contains supplier_supplier_id, product_product_id and product_price.
I would like to get the min value of price for given product_id.
The select should also return supplier_name, product_price and product name.

Thanks

Options: ReplyQuote




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.