This is what I have currently (cut down a little):
SELECT *, item_prices.price AS minPrice
FROM items
LEFT JOIN item_details USING(item_id)
LEFT JOIN item_prices USING(item_id)
WHERE 1=1
GROUP BY item_id;
My issue is that item_prices may match more than one row for each item – I only want to get the row with the minimum value of price. I’ve been looking around SO and the web for similar questions but I’m feeling a bit out of my depth here, can anyone help?
You should use query: