This question already has an answer here:
I have two tables, one containing all the quantities of products by country and another table that contains the prices by country.
When I add a condition for example country = "ch", I have the price correct for this country, I want to return different prices for all countries. How can I do that?
Here's my query:
SELECT items.prod, items.qty_fr, items.date, products.price FROM items LEFT JOIN products ON products.product = items.prod WHERE products.country = "CH" GROUP BY items.prod
This is the result of my query:
It returns the first value
Here's my first table:
My second table :