I have a database with tables:
suppliers:
fid , name
1 | 'Andrey'
2 | 'lucas'
products:
pid , name
1 | 'X'
2 | 'Y'
prdtFrn:
pid , fid , price
---------------- supplier 'andrey'
1 | 1 | 19.00
2 | 1 | 16.00
----------------- supplier 'lucas'
1 | 2 | 14.00
2 | 2 | 18.00
Querying the products, I get all products that have registred, but I need know who sells current product of ‘product table’ as lowest price, I don’t know how to write the query
You will see multiple rows per product where two suppliers are selling a product at the same price.