I've got the following 2 tables:
- ingredients (id, name)
- ingredient_prices (id, ingredient_id, price, created_at)
such that one ingredient can have many prices. What will be the best way to get the latest entered price per ingredient? I know it can be done easily with sub-selects, but I want to know if there is a more efficient way for doing it.