Dear Experts,
I have problem in Microsoft Access/SQL query.
I have three database tables (1.
Material
, 2.
Suppliers
, 3.
OFFERS
)
OFFERS
table contains different offers of suppliers for different materials like as:
OfferID Quantity UnitPrice DelTime Supplier Material
1 1 99 5 A Chair
2 3 90 5 A Chair
3 5 80 5 A Chair
4 1 95 5 B Chair
5 1 90 5 C Chair
6 3 85 5 C Chair
7 10 80 5 C Chair
I want to get the supplier with overall lowest cost for 14 chairs.
The paper work for overall lowest price is given as:
Material: Chairs
Order quantity: 14
Cost for Supplier A:
10 x 80 = 800 (as by offer 3)
3 x 90 = 270 (as by offer 2)
1 x 99 = 99 (by offer 1)
Overall Cost for supplier A is: 1169
Cost for Supplier B:
14 x 95 = 1330 (by offer 4)
Overall Cost for supplier B is: 1330
Cost for Supplier C:
10 x 80 = 800 (by offer 7)
3 x 85 = 255 (by offer 6)
1 x 90 = 90 (offer 5)
Overall Cost for supplier C is: 1145
In this, Supplier C offers the minimum cost for 14 chairs.
How I can access it via a query?