get articles with max date only
Hello Everyone
I've got a little problem with a sql query. I got two tables and a lot of articles. The articles are listed multiple times and got different dates. I want to select the following rows:
- p.productname
- i.amount
- i.date
The problem is, that every product only should be listed one time (something like UNIC or DISTINCT). And it should be the product with the highest date. Is there something like MAX(date) that I can use?
What I already have is...
SELECT
p.productname,
i.amount,
i.date
FROM op_inventory i
LEFT JOIN products p
ON p.ItemID = i.fk_article
Now, how can I solve my problem above?...
Greets Dollique
