I have two MySQL tables (product and price history) that I would like to join:
Product table:
Product
Id = int Name = varchar Manufacturer = varchar
Try this:
SELECT Product.UPC, Product.Name, Price_h.Price, MAX(Price_h.Date) FROM Product INNER JOIN Price_h ON Product.Id = Price_h.Product_id GROUP BY Product.UPC, Product.Name, Price_h.Price